GamePad.js being one of the default scripts in Unity.
var gamePadInstance ;
function Start () {
gamePadInstance=GetComponent(GamePad);
gamePadInstance.target = RacerP;
}
Within GamePad.js I have changed target to a so that I can assign game objects as target values for the camera.
var target : GameObject;
↧