Silveryard Posted May 29, 2013 Report Share Posted May 29, 2013 Erstmal mein Code: var texture : Texture2D; function Start() { texture = Resources.Load("Hauptmenue_00010") as Texture; } function OnGUI() { GUI.DrawTexture(new Rect(0,0,Screen.width, Screen.height), texture); } Jetzt das Problem: Es lädt einfach nicht.... Ich hab die jpg in den Resources-Ordner gelegt, aber mir wird der Error angezeigt, dass keine Textur zugewiesen wurde. Link to comment Share on other sites More sharing options...
HortusLongus Posted May 29, 2013 Report Share Posted May 29, 2013 Jetzt das Problem: Es lädt einfach nicht.... Ich hab die jpg in den Resources-Ordner gelegt, aber mir wird der Error angezeigt, dass keine Textur zugewiesen wurde. Jaja, Unity und seine Typen ... var texture : Texture2D; function Start() { var texObj : Object; texObj = Resources.Load("Hauptmenue_00010", typeof(Texture2D)); texture = texObj; } Ich kann kein US, aber so in der Art sollte es gehen; vielleicht mußt du auch nochmal casten. Link to comment Share on other sites More sharing options...
Silveryard Posted May 29, 2013 Author Report Share Posted May 29, 2013 Ah Danke, jetzt gehts. Unity ist da aber auch etwas eigen Link to comment Share on other sites More sharing options...
Sascha Posted May 29, 2013 Report Share Posted May 29, 2013 Komisch, eigentlich müsste dein Code auch funktionieren... Link to comment Share on other sites More sharing options...
Silveryard Posted May 29, 2013 Author Report Share Posted May 29, 2013 Ich habs nochmal geladen und jetzt geht meiner plötzlich auch o.O Irgendwas muss jetzt anders sein, aber ich komm nicht drauf, was. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.