コード例 #1
0
        public override void OnInspectorGUI()
        {
            if (bPrefab)
            {
                base.DrawDefaultInspector();
                return;
            }
            bool bChanged = false;

            serializedObject.Update();
            EditorGUILayout.PropertyField(OnOffToggle);
            if (OnOffToggle.boolValue)
            {
                EditorGUILayout.LabelField(_t.name, EditorStyles.largeLabel);
                using (new GUIBackgroundColorScope(Util.CustomEditorGUI.Color_LightYellow))
                {
                    if (GUILayout.Button("ReName"))
                    {
                        _t.AutoName();
                    }
                }
                EditorGUI.BeginChangeCheck();
                EditorGUILayout.PropertyField(formatString);
                EditorGUILayout.PropertyField(Postfix_Sprite);
                if (EditorGUI.EndChangeCheck())
                {
                    bChanged = true;
                }
            }
            serializedObject.ApplyModifiedProperties();
            if (bChanged)
            {
                _t.AutoName();
            }
        }
コード例 #2
0
 public void Rename()
 {
     autoName.AutoName();
 }