public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();
            serializedObject.Update();

            EditorUtils.BrandField();

            using (new EditorGUI.DisabledScope(true))
                EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script"));

            EditorGUILayout.PropertyField(this.settingsProperty);

            EditorGUI.indentLevel++;

            if (this.settingsProperty.objectReferenceValue == null)
            {
                this.editor = null;
            }

            if (this.editor == null && this.settingsProperty.objectReferenceValue != null)
            {
                Editor.CreateCachedEditor(this.settingsProperty.objectReferenceValue, null, ref this.editor);
            }

            if (this.editor != null)
            {
                this.editor.DrawDefaultInspector();
                this.editor.serializedObject.ApplyModifiedProperties();
            }

            EditorGUI.indentLevel--;

            if (!searchedInstallation)
            {
                kinectInstall        = KinectEditorUtils.FindInstallation();
                searchedInstallation = true;
            }

            if (kinectInstall == KinectInstall.Ignore)
            {
                EditorGUILayout.HelpBox("Unable to find Kinect 2.0 SDK installation.", MessageType.Warning);
            }
            else if (kinectInstall == KinectInstall.Missing)
            {
                EditorGUILayout.HelpBox("Kinect 2.0 SDK is not installed. Components that require the SDK can throw errors.", MessageType.Error);
            }

            serializedObject.ApplyModifiedProperties();
            EditorGUI.EndChangeCheck();
        }
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();
            serializedObject.Update();

            EditorUtils.BrandField();

            using (new EditorGUI.DisabledScope(true))
                EditorGUILayout.PropertyField(serializedObject.FindProperty("m_Script"));

            KinectEditorUtils.BrainInHierarchy(this.me.transform, ref this.brain);
            KinectEditorUtils.BrainField(this.brain);

            serializedObject.ApplyModifiedProperties();
            EditorGUI.EndChangeCheck();
        }
Beispiel #3
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();
            serializedObject.Update();

            EditorLayoutUtility.ScriptField(base.serializedObject);

            EditorLayoutUtility.ScriptableField(this.settingsProperty, ref this.editor);

            EditorGUILayout.PropertyField(this.enableInEditorProperty);

            if (!KinectEditorUtils.IsSDKInstalled())
            {
                EditorGUILayout.HelpBox("Unable to find Kinect 2.0 SDK installation.", MessageType.Warning);
            }

            serializedObject.ApplyModifiedProperties();
            EditorGUI.EndChangeCheck();
        }