Skip to content

Instantly share code, notes, and snippets.

@OutlawGameTools
Last active October 3, 2015 08:09
Show Gist options
  • Save OutlawGameTools/ab073823c9b9f368f464 to your computer and use it in GitHub Desktop.
Save OutlawGameTools/ab073823c9b9f368f464 to your computer and use it in GitHub Desktop.
CS109 - Enables a game object's renderer after a specified delay. Make invisible objects visible.
#pragma strict
public var showDelay : float = 0.2;
public var startHidden : bool = true;
function Awake()
{
if (startHidden)
gameObject.renderer.enabled = false;
}
function Start ()
{
Invoke("ShowMe", showDelay);
}
function ShowMe ()
{
gameObject.renderer.enabled = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment