private void Awake() { if (instance_ != null) { this.LogError("Already have an instance of CyanEmuUdonManager!"); DestroyImmediate(this); return; } instance_ = this; }
private void SetUdonbehaviour(UdonBehaviour udonbehaviour) { if (udonbehaviour == null) { this.LogError("UdonBehaviour is null. Destroying helper."); DestroyImmediate(this); return; } udonbehaviour_ = udonbehaviour; CyanEmuUdonManager.AddUdonBehaviour(udonbehaviour_); }
private void SetUdonBehaviour(UdonBehaviour udonBehaviour) { if (udonBehaviour == null) { this.LogError("UdonBehaviour is null. Destroying helper."); DestroyImmediate(this); return; } udonBehaviour_ = udonBehaviour; #pragma warning disable 618 SyncPosition = udonBehaviour_.SynchronizePosition; #pragma warning restore 618 CyanEmuUdonManager.AddUdonBehaviour(udonBehaviour_); }
private void OnDestroy() { CyanEmuUdonManager.RemoveUdonBehaviour(udonBehaviour_); }