Skybox not rendering

hello,

i am using the default blue sky skybox shader front standard assets, it works fine on the mac, but as soon as i cross compile to the iphone, i just got the background color again, what am i making wrong?

i already changed the import settings of the graphics to a iphone-able format.

Sometimes, for reasons unknown to me, when I Build for iPhone in Unity it doesn’t move the newly compiled app onto the iPhone. It, instead, continues to run the previous version of the app. So, in your case, maybe the skybox isn’t displaying on the iPhone because the new change didn’t compile and install properly from XCode? If so, it will fix itself by building again or doing a “clean all targets” in XCode.

** Has anyone else experience the type of problem I reported above? just curious. **

Take a look how sky-box is done in Star Trooper example

Yes, I did , but I always though it was because I forgot to save the scene before building.

thanx for the answers.

well, i can ensure, that is is the new version, and i have looked at startrooper (though never tried if it works when crosscompiling startrooper to be honest).

as far as i understand it, in edit / rendersettings, i set ‘skybox material’ to ‘blue sky’ (or sunset, tried both), make sure, the main camera has ‘Clear Flags’ set to ‘Skybox’, make sure all skybox images are imported as ‘RGB Compressed PRVTC 4-Bit’ and that should do the trick?

the graphics seem pretty close to the limit of the iphone and it is a large scene. could this be some result of reduced clip plane on the iphone or something?

Sounds like you’re doing everything right. Skybox is not affected by the clip planes, so you should see it nevertheless.

Could you try temporarily removing/disabling everything from your scene and check if you would see skybox then.

tried it, still only the background color

i noticed that i get a warning, i have this warning since i ‘downgraded’ the project from unity pro to the unity iphone. didn’t seem to do any harm, but maybe this has something to do with it?

Doesn’t sound good. Please make your project as small as possible, but still showing off the problem with skybox and attach it to the bug report.

This issue was driving me crazy a couple days ago - and it is definitely a bug with Unity (I have a report filed) - but I figured out that you can work around it by attaching a skybox component directly to your camera object.

Hope this helps!

great! this works, thank you very much

1 Like

just found out, what is happening, at least in my case.

of course i do have a scene in front of the game, a scene which handles the main menu. i am pretty sure, that i don’t change anything to the rendersettings in this scene, but if you first go into the mainmenu, then via Application.LoadLevel() load the game, the rendersettings of the default skybox are gone. you have to set them script wise ( RenderSettings.skybox = … ) or like robur by using a component.

seems unity alters the default setting, but only on the iphone, because on the mac everything works fine.

Please, don’t forget to file it as a bug