The following link is down:
http://docs.unity3d.com/Documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
I have been having issues accessing a variable from one script on a GUI text to a second script attached to a another GUI text.
My searches keep pointing me to this dead link. This is a pretty basic issue. I would like to do it in Javascript.
here is my code:
Script 1: Timer.js - On first GUI Text
function Update ()
{
var gameTime = Time.time;
var playerDays : float = 0;
guiText.text = gameTime.ToString();
if(gameTime > 30)
{
playerDays ++;
guiText.text = "A day in game time";
}
}
Script 2: Player Days.js - On Second GUI Text
function Update ()
{
playaDays = Timer.playerDays;
guiText.text = playaDays.ToString();
}
I would like to get the value for playerDays in Timer.js in Player Days.js
Thank you for any help