Instantiate removes reference to Srializefield in Prefab
Mt․Marron
It works fine on UnityEditor, but when I build to VRChat's OfflineTest, I get an error that the TextMeshProUGUI attached to the Instantiated GameObject is null.
Does the SerializeField get stripped when Instantiated for VRChat use?
I would like to know if you know how to solve this problem.
[UdonSharp][Unknown] Assets/**/Scripts/Presentation/**.cs(19,43): VRChat client runtime Udon exception detected!
An exception occurred during EXTERN to 'TMProTextMeshProUGUI.__set_text__SystemString__SystemVoid'.
Parameter Addresses: 0x00000003, 0x00000009
Object reference not set to an instance of an object.
Log In
そてゅー
I'm running into the same issue. It's the same for me that the issue occurs in VRChat but not in ClientSim in the editor.
It seems it happens when a "nested" prefab is Instantiate'd.
🟦 Parent prefab
🟦 Child prefab
When the parent prefab gets Instantiate'd, the parent prefab's UdonBehaviour works fine, but the child prefab's UdonBehaviour has all SerializeField's value reset to default.