Unity Game Development Unity Editor Extensions
Class overview Class 9 Revision CustomEditor MenuItem EditorWindow Spawning Objects Display Selected Objects Advanced: RayCast Spawning Advanced: Cube Spawning Objects
Revision Import & Setup Character Import & Setup Weapon Import & Setup Animations Bone rotations (Aiming) Animation Masking Inverse Kinematics (IK) Advanced: Impact marking Advanced: Aiming Camera
CustomEditor CustomEditor adds custom Editor UI OnInspectorGUI to add functionality GUILayout.Label GUILayout.Button EditorGUILayout.Colorfield EditorGUILayout.Slider … Execute actions in EditorMode
MenuItem MenuItem allows adding new entries in Toolbars Execute action by clicking on it or by assigning a shortcut
EditorWindow EditorWindow allows creation of new Windows Each Window can have unique functionality: Procedural Generation Renaming Objects Spawning / Editing / Replacing objects Generating complete Levels / Worlds … Anything you can imagine!
Spawning Objects Spawn Objects from selection Selection.activeObject Main active object as shown in inspector Selection.gameObjects Multiple objects selected using CTRL Determine position and rotation using user input and store it :
Display Selected Objects List selected objects by appending a string Iterate over each entry of selected objects
Advanced: RayCast Spawning Shoot RayCast from Random Position downwards Instantiate Random Object on RayHit Position Attach to empty Parent to reduce Object clutter in Scene Hierarchy
Advanced: Cube Spawning Objects Ensure user has Cube selected Access Bounds of Cube for Min / Max values
Q&A Do you have any questions related to the topics mentioned?