Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            TextHistory history = target as TextHistory;

            GUILayout.BeginHorizontal();
            sampleText = GUILayout.TextField(sampleText);
            if (GUILayout.Button("Push"))
            {
                if (!string.IsNullOrEmpty(sampleText))
                {
                    history.PushText(sampleText);
                }
            }
            GUILayout.EndHorizontal();
            if (GUILayout.Button("Clean"))
            {
                history.Clear();
            }
        }