import UnityEngine.UI;
static var CurrentAmmo : int;
var InternalAmmo : int;
var AmmoDisplay : GameObject;
static var LoadedAmmo int;
var InternalLoaded : int;
var LoadedDisplay : GameObject;
function Update () {
InternalAmmo = CurrentAmmo;
InternalLoaded = LoadedAmmo;
AmmoDisplay.GetComponent.().text = "" + InternalAmmo;
LoadedDisplay.GetComponent.().text = "" + InternalLoaded;
}
That is my script, copied from "How To Make An FPS In Unity 5 Tutorial - Beginners - Part 009.
I cannot spot a single erroe, however I am a newbie to unity, so help would be appreciated.
↧