Skip to main content

Unity Editor Basics #5: Menu bar: GameObject📦

By June 21, 2021January 23rd, 2022No Comments
Unity Editor
🔮The menu bar is right below the title bar
🔮Has all these menu options: File, Edit, Assets, GameObject, Component, Window and Help
🔮The GameObject option has options to allow you to add new game objects
🔮A GameObject is anything with a “Transform Value.” Transforming means being able to move, scale, or rotate an object such as a cube
🔮 You can also make new game objects by right clicking in the Hierarchy window and then choosing to click 2D, 3D objects, a light which is also an object, camera and so on
🔮You can add an empty game object with the Create Empty and Create Empty Child options
🔮An empty GameObject has ONLY transform values,It is a single point without dimension! You can use an empty GameObject to define a point in space for use as a waypoint. You can use it to re-define a mesh’s pivot point by specifying the mesh be a child of the empty game object. It can also be used to create an ad hoc folder system in the Hierarchy View.
🔮 If making a 3D game you can create all these 3D objects such as Cube, Sphere etc
🔮 Similarly if you're making a 2D game you can create a Sprite, Tile map etc
🔮 You can also add a light, camera, video and audio which are all considered game objects in game development
🔮You can make a cube a child of another cube and then click on Clear Parent to un-parent the child from its parent
🔮 Make as first/last sibling:This changes the order of the cube siblings as seen in the Hierarchy window so now Cube B is the elder sibling when we click on set as first sibling. Similarly if we click on set as second sibling while cube B is still selected, it will make it the younger sibling of cube A as seen by its placement in the Hierarchy window
🔮Move to View: This is an alignment command. It will move the selected object to the center of the viewport. By selecting an object such as a cube from the Hierarchy window and then choosing Move to View from the dropdown menu we can move an object to the current view or center of the viewport where are able to see it. So, it physically moves the game object to the center of the scene window. It moves it to the focal point of your scene view.
This is very useful for moving GameObjects that might be extremely far in your scene to the center of your scene/viewport
🔮Align with View: This is another alignment command, it is like the Move to view command however in addition to moving the selected game object it will also rotate the object with respect to the current view. So it will move and rotate the selected object with respect to the position and rotation of the viewport.
This is especially useful for moving a Camera into alignment. Let's select the camera GameObject and then click on Align with View. This will put the camera exactly in the same place as scene view/viewport so you might not see it. It will also rotate with respect to the viewport And then
🔮Align View to Selected: This will do the opposite of Align with View so it will align the viewport to the position and rotation of a GameObject. So your viewport will look to the selected GameObject. Let's select the camera and then go to Align View to Selected you will see that the scene rotated and moved with respect to the position and rotation of the Camera and now we are seeing the same thing in the scene and game view.
🔮 Toggle Active State: Toggle Active State turns GameObjects on and off. This can also be done with the first checkbox that appears in the Inspector window next to the game object’s name

Leave a Reply