MerlinVR / UdonSharp

An experimental compiler for compiling C# to Udon assembly
MIT License
678 stars 89 forks source link

[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] does not reset sync modes #117

Open bdunderscore opened 3 years ago

bdunderscore commented 3 years ago

Describe the bug in detail: When an UdonBehaviour component is set to None sync mode internally, changing the backing C# component to use [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] does not change it back to Continuous or Manual sync modes (and thus, RPCs remain unusable).

Provide steps/code to reproduce the bug:

  1. Apply [UdonBehaviourSyncMode(BehaviourSyncMode.None)] to a component.
  2. After U# applies this to the UdonBehaviour, change to [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]

Expected behavior: The sync mode should be reverted to Continuous. Instead, it remains None.