// Start is called before the first frame update public override void OnInspectorGUI() { base.OnInspectorGUI(); SPUM_SpriteEditManager SPB = (SPUM_SpriteEditManager)target; if (GUILayout.Button("Empty All Sprite", GUILayout.Height(50))) { SPB.EmptyAllSprite(); } }
void Update() { if (Selection.activeGameObject != this.gameObject) { return; } TextureToSprite(); if (_manager == null) { _manager = GameObject.FindObjectOfType <SPUM_SpriteEditManager>(); } }
void Update() { if (Selection.activeGameObject != this.gameObject) { return; } if (_mySprite == null) { _mySprite = transform.GetComponent <SpriteRenderer>(); } else { _mySprite.sprite = _nowSprite; } if (_manager == null) { _manager = GameObject.FindObjectOfType <SPUM_SpriteEditManager>(); } }