Unity Pointers

I write this for myself as a reminder. Usually I don’t take notes, but if this helps me, I might want to start making it a hobby.

Download the free version in here. Install. Run. Create new project, import the assets later.

First Sight
There are tabs called ‘Views’– Hierarchy, Project, Console, Scene, Game and Inspector. My favorite layout is in Window > Layouts > 2 by 3.

Navigate in the Scene by click-dragging the middle mouse button to move around, scrolling to zoom and clicking the Scene gizmo to change perspective. Toggle the GameObject gizmos on and off in the Scene and Game View by selecting the Gizmos pull-down button on each.

Click play button to run the project in the Game View and click again to stop it. There are rendering statistics in the top right if the Game View.

Inspector views the Components of selected GameObject. Select GameObjects in the Hierarchy or directly clicking them in the Scene. Use Tags to group certain GameObjects and use Layer to assign rendering layer.

Go to File > Build Settings > (select platform & scene to build) > Build.
On Android
Set SDK path in Edit > Preferences > External Tools. Unity 4.0+ doesn’t support Android ARMv6 devices. Damn.

In Java, all are Objects. Here, all are GameObjects. The world is the Scene. Create GameObject and put it in the Scene by clicking Create button on Hierarchy or on the menu toolbar. Import assets if necessary.

GameObjects have Components that specify what it was meant to be in the Scene–a physical object, a camera, a static object… . GameObjects must have a Transform component to basically exist in the Scene. Scripts are attached as our own customized Components–their public variables can be assigned in Inspector as Components.

Use Prefabs to create clones of certain GameObjects. Drag-and-drop a GameObject in Hierarchy to Prefabs folder in the Project View to create a Prefab of it. To change all GameObjects of a certain Prefab just modify one of them and click Apply in the Prefab control buttons in Inspector.

A GameObject needs MeshCollider so collision effects can be applied, otherwise everything will just go through it. Add RigidBody component if it has to be affected by physics. CharacterController can affect RigidBody but not the other way around.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.