Describe the bug in detail:
It seems UdonSharpBehaviour/Prefab checking/auto-saving process happens before C# script complies. It can cause loss of variable data in U# behaviour, especially if they are added by version controls (such as Git).
This makes major issue on Git contribution of World projects: we need checking if added new variables are lost.
Provide steps/code to reproduce the bug:
Create an U# script that has no public variables. (Script A)
Attach Script A to any GameObject on a scene, then save the GameObject to an prefab. (Prefab A)
Save the scene then save project.
Make commit any additives/changes on git. (Commit A)
Add an public variable into Script A (any type is OK, notable if GameObject types).
Open prefab editor on Prefab A: Change the variable added in Prefab A from default value.
Save the prefab.
Make commit any additives/changes on git. (Commit B)
Checkout current working tree to Commit A: this will revert adding the public variable.
Close Unity.
Checkout current working tree to Commit B: this is the reproduction of 'Pulling from a remote', adding the public variable from version control.
Re-open Unity.
After script compile, observe the public variable in Prefab A.
Expected behavior:
The value of public variable are still same set by [6.] process.
Actual behavior:
The value of public variable are set to default value, losing checkout data.
Describe the bug in detail: It seems UdonSharpBehaviour/Prefab checking/auto-saving process happens before C# script complies. It can cause loss of variable data in U# behaviour, especially if they are added by version controls (such as Git).
This makes major issue on Git contribution of World projects: we need checking if added new variables are lost.
Provide steps/code to reproduce the bug:
Expected behavior: The value of public variable are still same set by [6.] process.
Actual behavior: The value of public variable are set to default value, losing checkout data.