Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by zero_null · Nov 25, 2016 at 10:40 AM · scene-loadingskyboxesuntiy3d

Load a different sky box in each world

I am currently making a game in which I have my camera in the first main menu scene whereas I am loading my world/environment asynchronously. My camera has script with DontDestroyOnLoad. The camera renders everything perfectly but it just can't render skybox of the latest loaded scene. It's still showing skybox of previous scene. I am using Unity 5.4.2 and Lighting window for creating skybox in each scene. My main menu doesn't have any Skybox. How can I make my camera to load skybox of every scene.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by hexagonius · Nov 25, 2016 at 11:35 AM

Add a skybox component to the main camera and assign it the skybox you need:

https://docs.unity3d.com/Manual/class-Skybox.html

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image zero_null · Nov 25, 2016 at 03:24 PM 0
Share

that was cruel :(

avatar image hexagonius zero_null · Nov 25, 2016 at 10:51 PM 0
Share

? What do you mean by that?

avatar image Bryangs hexagonius · Nov 26, 2016 at 01:29 AM 0
Share

He is "annoyed" because you just throw a link for him and used a one phrase message as answer.

Show more comments
avatar image Bryangs · Nov 26, 2016 at 04:50 PM 0
Share

Exactly, dude.

avatar image hexagonius · Nov 26, 2016 at 05:49 PM 0
Share

ok, sorry, i try again than:
If you want to change the skybox during gameplay you're best off by adding a Skybox component to the camera you want the skybox to render. you can then add additional code that changes it on every scene load. But you don't have to of course. ;)

avatar image
1

Answer by vfxjex · Mar 17, 2017 at 09:37 PM

RenderSettings.skybox = material;

 public class LevelManager : MonoBehaviour {
 
     [SerializeField]
     Material[] skyboxes;
 
     void Awake()
     {
         RenderSettings.skybox = skyboxes[yourSkyboxIndex];
     }
 }
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by BdarVirtu · Oct 23, 2020 at 12:31 PM

What if I want a different skybox per scene, not per camera? It makes a lot of sense to have that option, albeit, unfortunately, Unity doesn't seem to have that...

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

62 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

put a void in an if statement? 1 Answer

LoadScene problem 1 Answer

Using parameters of activeSceneChanged? 0 Answers

Unity crashes after oping a scene from unity collaborate? 0 Answers

'Resource file has already been unloaded' error when exiting application in Editor 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges