SerializeReference values in the avatar revert when the SDK Builder panel is opened
nekobako
Reproduction steps:
- Attach a component that contains a SerializeReference to an avatar.
- Assign an AnimatorController to the avatar’s Animator.
- In the AnimatorController, create an Animation that animates a value in the SerializeReference.
- Open the SDK Builder panel.
- In the Inspector, change the value in the SerializeReference.
- After about 2 seconds, the value reverts to its previous state.
The component that contains a SerializeReference is something like this.
using System;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
[Serializable]
private class Test
{
public float TestValue;
}
[SerializeReference]
private Test TestReference = new();
}
Expected behavior:
Even when the SDK Builder panel is open, the values set in the Inspector should not revert.
Log In
nekobako
I’ve reposted this issue with simple and accurate information.
Please merge this post into the new one: https://feedback.vrchat.com/sdk-bug-reports/p/avatar-property-changes-revert-while-the-sdk-builder-panel-is-open
nekobako
It turns out this issue occurs not only with SerializeReference, but also with regular SerializeField values.
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public float TestValue; // animate this
}
In non-destructive workflow, we sometimes animate custom components for use during the build process, and this issue is very troublesome in such cases.
This is an example of a tool that needs to animate custom components: