public AnimationCopy() { hideFlags = HideFlags.DontSave; if (_Instance != null) { Debug.LogError("Trying to create two instances of singleton. Self destruction in 3..."); Destroy(this); return; } _Instance = this; titleContent = new GUIContent("Animation Assigner"); position = new Rect((Screen.width - Size.x) / 2.0f, (Screen.height - Size.y) / 2.0f, Size.x, Size.y); base.minSize = new Vector2(Size.x, Size.y); CreateUI(); }
public void OnDestroy() { _Instance = null; }