Hey guys, I'm trying to implement a simple script to display images. The images load fine and are drawn to the screen but after about 15 seconds a fatal error occurs and Unity crashes.
Here's my code stripped down...
void Start () {
xu = Screen.width;
yu = Screen.height;
www = new WWW(@"file://D:\Slides\Assets\Final Renders\IM_00.jpg");
}
void OnGUI() {
GUI.DrawTexture(new Rect(0,0,xu/2,yu), www.texture, ScaleMode.ScaleToFit);
}
Here is the error I'm getting...
![alt text][1]
[1]: /storage/temp/25865-fatalerror.png
When the 'GUI.DrawTexture(new Rect(0,0,xu/2,yu), www.texture, ScaleMode.ScaleToFit);' line is commented out no error occurs.
The image is a JPEG and roughly 140KB. If anyone can point me in the right direction as to what I'm doing wrong it will be greatly appreciated! Cheers
↧