Beispiel #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();
        }
Beispiel #2
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();
        }
Beispiel #3
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();
        }