Quantcast
Channel: Latest Questions by w8193725
Viewing all articles
Browse latest Browse all 6

Draw GUITexture in multiple javaScript

$
0
0
Hi everyone I got a main script which binding with main camera that use for draw texture on screen by GUI. I also got another javaScript that can be called by first script, but I got a problem here!!! once I write following code in second javaScript that will make game lag (from 75 fps reduce to 5 fps): **GUI.DrawTexture (new Rect (200,200,43,98), theTexture);** Can anyone tell me why this happend and what should I do if I want draw GUI texture in multiple javaScript? the original code is: **first java script:** var coloredNumber:numbers; //call numbers class function OnGUI(){ coloredNumber.blackNumber(1234567890,500,540); //call blackNumber function } **second java script:** static var outputNumber:Texture; static var ScreenWidth:float; static var ScreenHeight:float; static function blackNumber(oriNumber:int,Sw:float,Sh:float){ ScreenWidth=Sw; ScreenHeight=Sh; var aS:String = oriNumber.ToString(); var asC:char[] = aS.ToCharArray(); for(var i:int=0;i

Viewing all articles
Browse latest Browse all 6

Trending Articles



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