Last active
October 3, 2015 08:09
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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