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

            ReactiveObjectEditor.DrawActivatorCheck(targets);

            HedgehogEditorGUIUtility.DrawProperties(serializedObject,
                                                    "RestoreOnExit",
                                                    "ModifyDirection");

            if (serializedObject.FindProperty("ModifyDirection").boolValue)
            {
                HedgehogEditorGUIUtility.DrawProperties(serializedObject, "Direction");
            }

            HedgehogEditorGUIUtility.DrawProperties(serializedObject, "ModifyStrength");
            if (serializedObject.FindProperty("ModifyStrength").boolValue)
            {
                HedgehogEditorGUIUtility.DrawProperties(serializedObject,
                                                        "AirStrength",
                                                        "GroundStrength");
            }

            serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            ReactiveObjectEditor.DrawActivatorCheck(targets);

            if (targets.Count() > 1)
            {
                DrawDefaultInspector();
            }
            else
            {
                HedgehogEditorGUIUtility.DrawProperties(serializedObject, "DebrisObject", "DebrisSize", "UseSprite");
                var useSpriteProp = serializedObject.FindProperty("UseSprite");

                if (useSpriteProp.boolValue)
                {
                    HedgehogEditorGUIUtility.DrawProperties(serializedObject, "SpriteRenderer");
                }
            }

            serializedObject.ApplyModifiedProperties();
        }