private static void DoEditRegularParameters(AnimationEvent evt, Type selectedParameter) { if (selectedParameter == typeof(AnimationEvent) || selectedParameter == typeof(float)) { evt.floatParameter = EditorGUILayout.FloatField("Float", evt.floatParameter, new GUILayoutOption[0]); } if (selectedParameter.IsEnum) { evt.intParameter = AnimationEventPopup.EnumPopup("Enum", selectedParameter, evt.intParameter); } else if (selectedParameter == typeof(AnimationEvent) || selectedParameter == typeof(int)) { evt.intParameter = EditorGUILayout.IntField("Int", evt.intParameter, new GUILayoutOption[0]); } if (selectedParameter == typeof(AnimationEvent) || selectedParameter == typeof(string)) { evt.stringParameter = EditorGUILayout.TextField("String", evt.stringParameter, new GUILayoutOption[0]); } if (selectedParameter == typeof(AnimationEvent) || selectedParameter.IsSubclassOf(typeof(UnityEngine.Object)) || selectedParameter == typeof(UnityEngine.Object)) { Type type = typeof(UnityEngine.Object); if (selectedParameter != typeof(AnimationEvent)) { type = selectedParameter; } bool allowSceneObjects = false; evt.objectReferenceParameter = EditorGUILayout.ObjectField(ObjectNames.NicifyVariableName(type.Name), evt.objectReferenceParameter, type, allowSceneObjects, new GUILayoutOption[0]); } }