Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How to make an image pop up?

$
0
0
I want to make Javascript so that in Credits GUI an image pops up after 10 seconds. So 10 seconds the text scrolls and then script takes place: an image pops up suddenly. This is my code so far but i got stuck: public var myVar:float = eventTimer (10); private var timeElapsed (0); function Start () { } yield WaitForSeconds (10); function OnGUI () { if(aTexture == null) { Debug.LogError("Assign a Texture in the inspector."); return; } else if(timeElapsed >= eventTimer){ GUI.DrawTexture(Rect(10,10,60,60),aTexture,ScaleMode.ScaleToFit,true,10.0f); } function () Update; { timeElapsed = Time.deltatime; if(timeElasped >= eventTimer){ /*GUIDrawTextureFunction*/}; timeElapsed = 0; }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>