Esempio n. 1
0
    // 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();
        }
    }
Esempio n. 2
0
    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>();
        }
    }