Beispiel #1
0
        // Use this for initialization
        void Start()
        {
            miniaturGameObjectScript = GetComponent <MiniaturGameObjectScript>();
            button = GetComponent <CompoundButton>();

            button.StateChange += stateChange;
        }
        public override void OnInspectorGUI()
        {
            // Draw the default
            base.OnInspectorGUI();

            // Place the button at the bottom
            MiniaturGameObjectScript myScript = (MiniaturGameObjectScript)target;

            if (GUILayout.Button("Update preview"))
            {
                myScript.showGameObjectPreviewFromPrefab();
            }
        }