Hi,
I am having this problem of missing GUITextures in builds (Win Desktop and Webplayer) but not in Editor. I tried the suggestion given here, but no avail.
I tried clearing the scene list, and re-adding again, but no avail.
Can someone please help?
So, I don;t have a solution for you, but I think what I’d do is work out if the assets are missing from the build, or are present but not displayed correctly. See the example here:
which shows the basic approach. I think you’d want FindObjectsOfType (note the s in the middle) to get all the GUITextures. Dump them out to the log and you’ll know if the texture is present in the build or not. Assuming it is in the build (and I suspect it is) then I guess the GUITexture is not rendered, and so you’ll need to debug some of that. Maybe dump to the log the variable that GUITexture has - see:
http://docs.unity3d.com/Documentation/ScriptReference/GUITexture.html
Compare that against what the editor shows. Finally, I have a sneaky suspicion that there is something funky that happens with the matrix on the Transform which can mess up where the GUITexture appears. Maybe dump out the transform as well.
@Graham Dunnett,
Thanks for the reply. I checked my resources, any caching to other gameobjects in the scene, iTween transformations, textures and everything was fine.
However, I found something rather wierd. I had ‘Button.js’ and ‘Button.cs’ in the same project. After renaming the ‘Button.js’ to ‘Button_old.js’, it worked well.
Previously I had ‘Button.js’ attached to the GUITexture, then I replaced it with C# version. After renaming the old .js file, everything works normally.