Sunday, 8 February 2015

Which platform was it building for?

A bit confused about the "build settings" screen in Unity. As below, while the unity icon was on "PC, Mac & Linux Standalone", selected "iOS", and then click on  "Build". Question is, will the build be for "iOS" or "PC, Mac & Linux Standalone"?

By cancelling it half way through, as the red error message indicates,  it was trying to launch XCode, so looks like it's for iOS.

this.gameObject.name and Input.GetAxis

Learned that you can:
Use Input.GetAxis("Mouse X") and Input.GetAxis("Mouse Y") to get the (X,Y) of mouse.
Use this.gameObject.name to print out the object name.
Both works when running on Mac.

void Update () {        
   print(this.gameObject.name+" Input.GetAxis(Mouse X)= ("+Input.GetAxis("Mouse X")+""+Input.GetAxis("Mouse Y")+")");
}


Was going to try and deploy to iOS, but gets this warning: "Game scripts or other custom code contains OnMouse_ event handlers. Presence of such handlers might impact performance on handheld devices." so might not be a good idea then.


Hello World

Like to start this blog to keep track of my Unity3D learning experience, hello world!