Esempio n. 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.Space();

            Inspector.AddContent(fixTransforms);

            // Editing References
            if (BipedReferencesInspector.AddModifiedInspector(references))
            {
                if (!Application.isPlaying)
                {
                    Warning.logged = false;
                    BipedReferences.CheckSetup(script.references);
                    script.InitiateBipedIK();
                }
            }

            // Editing Solvers
            BipedIKSolversInspector.AddInspector(solvers, solversProps, solverContents);

            EditorGUILayout.Space();

            serializedObject.ApplyModifiedProperties();
        }
Esempio n. 2
0
        public override void OnInspectorGUI()
        {
            if (serializedObject == null)
            {
                return;
            }

            serializedObject.Update();

            Inspector.AddContent(fixTransforms);

            AddInspector();

            if (serializedObject.ApplyModifiedProperties())
            {
                OnApplyModifiedProperties();
            }
        }
Esempio n. 3
0
        public override void OnInspectorGUI()
        {
            if (serializedObject == null)
            {
                return;
            }

            serializedObject.Update();

            Inspector.AddClampedFloat(timeStep, 0f, Mathf.Infinity);
            Inspector.AddContent(fixTransforms);

            AddInspector();

            if (serializedObject.ApplyModifiedProperties())
            {
                OnApplyModifiedProperties();
            }
        }
Esempio n. 4
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.Space();

            Inspector.AddContent(fixTransforms);

            // Editing References
            if (BipedReferencesInspector.AddModifiedInspector(references))
            {
                if (!Application.isPlaying)
                {
                    Warning.logged = false;

                    if (ReferencesValid(false))
                    {
                        BipedReferences.CheckSetupWarning(script.references, true);

                        // Initiate only when inspector changed
                        script.InitiateBipedIK();
                    }
                }
            }

            if (ReferencesValid(Application.isPlaying))
            {
                // Editing Solvers
                BipedIKSolversInspector.AddInspector(solvers, solversProps);
            }
            else
            {
                // Warning box
                WarningBox();
            }

            EditorGUILayout.Space();

            serializedObject.ApplyModifiedProperties();
        }
Esempio n. 5
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.Space();

            Inspector.AddContent(fixTransforms);
            string message = string.Empty;

            // Editing References
            if (BipedReferencesInspector.AddModifiedInspector(references))
            {
                if (!Application.isPlaying)
                {
                    Warning.logged = false;

                    if (!BipedReferences.SetupError(script.references, ref message))
                    {
                        script.InitiateBipedIK();
                    }
                }
            }

            if (BipedReferences.SetupError(script.references, ref message))
            {
                // Warning box
                AddWarningBox(message);
                Warning.Log(message, script.transform, false);
            }
            else
            {
                // Editing Solvers
                BipedIKSolversInspector.AddInspector(solvers, solversProps);
            }

            EditorGUILayout.Space();

            serializedObject.ApplyModifiedProperties();
        }