using UdonSharp; using UnityEngine; using VRC.SDKBase; using VRC.Udon; public class SecretVulpineTrigger : UdonSharpBehaviour { public GameObject Vulpine; [UdonSynced, FieldChangeCallback(nameof(SetFoxActive))] private bool FoxIsActive = false; public override void Interact() { if (Vulpine != null) { Networking.SetOwner(Networking.LocalPlayer, gameObject); SetProgramVariable("FoxIsActive", !FoxIsActive); RequestSerialization(); } } public bool SetFoxActive { set { Vulpine.SetActive(!Vulpine.activeSelf); FoxIsActive = value; } get => FoxIsActive; } }