Working with prefab and using the Variable Synchronizer

Hyrad

New member
Greetings, I have a base prefab to which I added the Variable Synchronizer. Since the variables that I need to reference are on another component on the same object, the prefab is referencing itself to access properties on this component. However when I instantiate it at runtime, the values remain at 0 instead of being updated by the instantiated object. I gather that this might be due to a prefab limitation and that I need to reference the instantiated object itself. Since the reference object field can only be assigned in editor mode on the Variable Synchronizer how do I do this?

Thanks,
Jeff
 
The Variable Synchronizer isn't able to work with prefabs. I recommend using property mappings instead and setting the property through code:

 
Top