public override void OnInspectorGUI() { var teleportScript = target as TeleportScript; serializedObject.Update(); EditorGUILayout.PropertyField(changeDestination_Prop); DestinationChangeType dest = (DestinationChangeType)changeDestination_Prop.enumValueIndex; switch (dest) { case DestinationChangeType.CHANGESCENE: sceneName_Prop.stringValue = EditorGUILayout.TextField("Scene Name", sceneName_Prop.stringValue); break; case DestinationChangeType.TELEPORT: destination_Prop.vector3Value = EditorGUILayout.Vector3Field("Teleport Position", destination_Prop.vector3Value); break; } destinationHasNewMusic_Prop.boolValue = EditorGUILayout.Toggle("Has Different Music", destinationHasNewMusic_Prop.boolValue); if (destinationHasNewMusic_Prop.boolValue) { newMusic_Prop.objectReferenceValue = EditorGUILayout.ObjectField("New Music", newMusic_Prop.objectReferenceValue, typeof(AudioClip), true); } EditorGUILayout.PropertyField(transitionDisplay_Prop); TransitionDisplayType trans = (TransitionDisplayType)transitionDisplay_Prop.enumValueIndex; switch (trans) { case TransitionDisplayType.ADJUSTABLETEXT: dateText_Prop.stringValue = EditorGUILayout.TextField("Date Text", dateText_Prop.stringValue); depthText_Prop.stringValue = EditorGUILayout.TextField("Depth Text", depthText_Prop.stringValue); break; case TransitionDisplayType.IMAGE: EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel("Transition Sprie"); transitionImage_Prop.objectReferenceValue = EditorGUILayout.ObjectField(transitionImage_Prop.objectReferenceValue, typeof(Sprite), true); EditorGUILayout.EndHorizontal(); break; } EditorGUILayout.PropertyField(transitionType_Prop); TransitionType type = (TransitionType)transitionType_Prop.enumValueIndex; switch (type) { case TransitionType.HARDCUT: transitionTime_Prop.floatValue = EditorGUILayout.FloatField("Transition Time", transitionTime_Prop.floatValue); break; case TransitionType.FADEOUT: transitionTime_Prop.floatValue = EditorGUILayout.FloatField("Transition Time", transitionTime_Prop.floatValue); fadeOutTime_Prop.floatValue = EditorGUILayout.FloatField("FadeOutTime Time", fadeOutTime_Prop.floatValue); break; } serializedObject.ApplyModifiedProperties(); }
private DestinationChangedEventArgs(DestinationChangeType type) { mChangeType = type; }
private DestinationChangedEventArgs(DestinationChangeType type) { mChangeType = type; }