public UdonHeapValueStorage(IUdonHeap heap, IUdonSymbolTable symbolTable, string symbolKey) { this.heap = heap; bool isValid = symbolTable.TryGetAddressFromSymbol(symbolKey, out symbolAddress) && heap.GetHeapVariableType(symbolAddress) == typeof(T) && heap.TryGetHeapVariable <T>(symbolAddress, out var validityCheckPlaceholder); if (!isValid) { symbolAddress = 0xFFFFFFFF; } }
public UdonHeapValueStorage(IUdonHeap heap, IUdonSymbolTable symbolTable, string symbolKey) { this.heap = heap; bool isValid = symbolTable.TryGetAddressFromSymbol(UdonSharpUtils.UnmanglePropertyFieldName(symbolKey), out symbolAddress) && heap.GetHeapVariableType(symbolAddress) == typeof(T) && heap.TryGetHeapVariable <T>(symbolAddress, out _); if (!isValid) { symbolAddress = 0xFFFFFFFF; } }