Skip to content

Commit

Permalink
Fix UdonSharp script export not using the correct heap var type somet…
Browse files Browse the repository at this point in the history
…imes

- Fix for some cases where the UdonSharp script asset to Udon Assembly asset export not using the correct symbol type in some circumstances.
  • Loading branch information
MerlinVR committed Apr 10, 2020
1 parent fc2f279 commit a1d612e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Assets/UdonSharp/Editor/UdonSharpEditorUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ public static UdonAssemblyProgramAsset UdonSharpProgramToAssemblyProgram(UdonSha

foreach (string symbol in symbols)
{
System.Type symbolType = uSharpProgram.SymbolTable.GetSymbolType(symbol);
object symbolValue = uSharpProgram.Heap.GetHeapVariable(uSharpProgram.SymbolTable.GetAddressFromSymbol(symbol));
uint symbolAddress = uSharpProgram.SymbolTable.GetAddressFromSymbol(symbol);
System.Type symbolType = uSharpProgram.Heap.GetHeapVariableType(symbolAddress);
object symbolValue = uSharpProgram.Heap.GetHeapVariable(symbolAddress);

assemblyProgram.Heap.SetHeapVariable(assemblyProgram.SymbolTable.GetAddressFromSymbol(symbol), symbolValue, symbolType);
}
Expand Down

0 comments on commit a1d612e

Please sign in to comment.