Ejemplo n.º 1
0
    // Start is called before the first frame update
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        SpriteSync SPB = (SpriteSync)target;

        if (SPB._mySprite.sprite != null)
        {
            if (GUILayout.Button("Sync Pivot", GUILayout.Height(50)))
            {
                SPB.SyncPivot();
            }
            if (GUILayout.Button("Remove Sprite", GUILayout.Height(50)))
            {
                SPB.RemoveSprite();
            }
        }
    }
Ejemplo n.º 2
0
 void SyncFistProcess(SpriteSync spriteSync, SpriteRenderer SP)
 {
     spriteSync.transform.position = SP.transform.position;
     Vector3 tV = new Vector3(SP.transform.position.x, SP.transform.position.y, SP.sortingOrder * 1f);
 }