Skip to main content

Posts

Showing posts from November, 2014

Unity 4.5 set the android sdk path

Notes: I encountered some problem when building unity project. message prompted saying the android sdk path is invalid. so im gonna share. today. how to set android sdk path in unity 4.5 1. click "edit" on project menu, select preferrences  2. Select External tool, select the Android SDK location 3.For my case, i saved my android sdk in below path.  4.Test our sdk path setting by building our project. Click "file", "build settings" 5.Click on build!. build should run succesfully

#P6 Kick Start - Unity [Moving the player]

1. Create project folder 2. Name the folder as scripts 3. Create new component, new script, name it as PlayerController, the script name must be started using Capital letter. Drag the script to "scripts" folder. *change the language to c# 4. Lets start scripting! double click the PlayerController script, it ll lead us to MonoDevelop-unity, scripting editor that bundled with unity software. using UnityEngine; using System.Collections; public class PlayerController : MonoBehaviour { void FixedUpdate () { float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = Input.GetAxis("Vertical"); //how much we want our object to move on the y-axis? nono //set to o.of float y_axis = 0.0f; //store the vector object in moving variable; Vector3 movement = new Vector3 (moveHorizontal, y_axis, moveVertical); rigidbody.velocity = movement; } } *ensure the method called Fixed...

#P5 Kick Start - Unity [Adding a background]

Create a "quad" object, rename to "background"    2. Set the background properties, transform the Y-axis to rotate 90 deg.            3. As the quad comes together with mesh collider, this time we going to remove it.                                          4. drag image "nebula" from our assets folder<textures to the background object           5. Change the background object setting to fit our game screen. Change a-axis to 15 and y-axis 30 aspect ratio of 1:2                                                                                                 ...

#P4 Kick Start - Unity [Setup Camera and Lighting]

To follow this tutorial, its a pre-requisite for us to follow previous tutorials as well http://ubuntuanakramli.blogspot.com/2014/10/p4-kick-start-unity-player-settings.html In this tutorial we ll setup the camera and lighting for our game. -this game is top down style game -we going to look down the game area from above fix the game 1. we click unto the game tab button, we can see the view of our game object or ship is completely not in the position that we wanted. 2. now we re-click unto the scene tab, and press ctrl + right mouse click (to do a zoom in out) 3. ok lets us play around and press alt and change the camera orbit position 4. we can see the position of the camera now is behind the player object, select the main camera in hierarchy explorer to view our camera preview.   5.reset the transformation value of the camera by, clicking the camera transformation setting button and choose "reset". 6. Change the camera view transformation rot...