![]() ![]() PlayerEngine playerEngine = new PlayerEngine() SerializedObject.ApplyModifiedProperties() SerializedProperty engine = serializedObject.FindProperty("engine") ĮngineType = (EngineType)EditorGUILayout.EnumPopup("Engine", engineType) Įngine.objectReferenceValue = SelectEngine() In the future it will detect his surroundings and command some actions to the Creature. _creature.direction = _creature.inputX != 0 ? (int)_creature.inputX : _creature.direction _creature.isRunning = _creature.isMovingX & _creature.isGrounded & inputCtrl _creature.isWalking = _creature.isMovingX & _creature.isGrounded & !inputCtrl _creature.inputX = !_creature.isMovingX ? 0 : ? -1 : 1 public IEngine engine //this is the property Public class CreatureSO : ScriptableObject I want to use the serializedObject method because of I know that there are two ways to access the properties of the class Creature with the target variable and with serializedObject. ![]() So I've created a script that overrides the default editor for the class CreatureSO that extends ScriptableObject. I want to do this to select between multiple classes that inherit from a base interface. Handler for message that is sent whenever the state of the project changes.Ĭalled whenever the selection has changed.Ĭalled multiple times per second on all visible windows.I would like to create a custom inspector with a dropdown menu. OnInspectorUpdate is called at 10 frames per second to give the inspector a chance to update.Ĭalled when the window loses keyboard focus. Handler for message that is sent when an object or group of objects in the hierarchy changes. OnDestroy is called to close the EditorWindow window.Ĭalled when the window gets keyboard focus. Get an Overlay with matching ID from an EditorWindow canvas.ĬreateGUI is called when the EditorWindow's rootVisualElement is ready to be populated. Show the EditorWindow as a floating utility window. Shows an Editor window using popup-style framing. Show the EditorWindow as a floating modal window. Show the editor window in the auxiliary window. Shows a window with dropdown behaviour and styling. Performs a save action on the contents of the window. Gets the extra panes associated with the window. Moves keyboard focus to another EditorWindow. Mark the beginning area of all popup windows.ĭiscards unsaved changes to the contents of the window.Ĭlose a window group started with EditorWindow.BeginWindows. Specifies whether a layout pass is performed before all user events (for example, EventType.MouseDown or ]), or is only performed before repaint events.Ĭhecks whether MouseEnterWindow and MouseLeaveWindow events are received in the GUI in this Editor window.Ĭhecks whether MouseMove events are received in the GUI in this Editor window. The GUIContent used for drawing the title of EditorWindows. The message that displays to the user if they are prompted to save Retrieves the root visual element of this window hierarchy. The desired position of the window in screen space. The minimum size is not used when the window is docked. The minimum size of this window when it is floating or modal. The maximum size is not used when the window is docked. The maximum size of this window when it is floating or modal. This property specifies whether the Editor prompts the user to save or discard unsaved changes before the window closes. Does the window automatically repaint whenever the Scene has changed? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |