[BUG] Error When Creating Prefabs with UdonSharp in VRChat SDK 3.5.0
tracked
mikinel
VRChat Version:
VRChat SDK - World 3.5.0
VRChat SDK - Base 3.5.0
Description of the bug:
When adding components created with UdonSharp to a GameObject and then either creating a prefab from this GameObject or saving changes to an existing prefab, an error occurs. This happens in the mentioned versions of the VRChat SDK. Despite the error, the functionality appears to be unaffected.
ErrorMessages:
ArgumentNullException: Value cannot be null.
Parameter name: unityObject
All Error Message
Steps to reproduce (how did you encounter the bug?):
Method 1:
- Create an empty UdonSharp script.
- Create an EmptyGameObject in the scene.
- Add the UdonSharp script from step 1 to the GameObject from step 2.
- Convert the GameObject into a prefab.
- Error occurs.
Method 2:
- Open the prefab created in Method 1 using the Prefab Editor.
- Modify a value (example: changing SynchronizationMethod).
- Save the prefab.
- Error occurs.
Log In
Inaba-Byakko
I'm annoying with the same problem, especially when pulling changes from Unity Version Control a.k.a. Plastic SCM. (There are very very huge amount of dialog, so I must click "Close" button so many times... ehhh!!!)
I can reproduce this issue with following code.
using UdonSharp;
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class FooColliderSwitch : UdonSharpBehaviour
{
public bool IsUsing { get; set; }
private void Start()
{
IsUsing = false;
}
}
Fax
tracked
Fax
needs more information
Hi! Are you still experiencing this issue in the latest SDK?
mikinel
Fax
Yes, this bug is still persisting.
VRChat SDK - Base 3.5.2
VRChat SDK - Worlds 3.5.2
Fax
Hmm, I'm having trouble reproducing this issue in 3.5.2.
By "Empty UdonSharp script", do you mean a script like this?
using UdonSharp;
public class EmptyUdonSharpScript : UdonSharpBehaviour
{
}
mikinel
Fax
You can reproduce it using the following script:
using UdonSharp;
using UnityEngine;
public class EmptyUdonSharpScript : UdonSharpBehaviour
{
[SerializeField] private float floatValue;
}
By changing the variables from the inspector and applying changes to the Prefab, you can reproduce it.
Fax
Ah, applying the changes is what allowed me to reproduce the issue!