Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();

            Target  = (T)target;
            Targets = targets.Select(t => (T)t).ToArray();

            P3dHelper.ClearColors();

            Separator();

            OnInspector();

            Separator();

            serializedObject.ApplyModifiedProperties();

            if (EditorGUI.EndChangeCheck() == true)
            {
                GUI.changed = true; Repaint();

                foreach (var t in Targets)
                {
                    EditorUtility.SetDirty(t);
                }
            }
        }
Ejemplo n.º 2
0
        protected virtual void OnGUI()
        {
            P3dHelper.ClearColors();

            scrollPosition = GUILayout.BeginScrollView(scrollPosition);
            {
                EditorGUI.BeginChangeCheck();
                {
                    OnInspector();
                }
                if (EditorGUI.EndChangeCheck() == true)
                {
                    SceneView.RepaintAll();
                }
            }
            GUILayout.EndScrollView();
        }