Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question how can I change skybox at runtime

Discussion in 'Scripting' started by cmne3602, Dec 6, 2022.

  1. cmne3602

    cmne3602

    Joined:
    Feb 17, 2022
    Posts:
    1
    Actually, I found way to apply another skybox material to scene.

    Code (CSharp):
    1. public Material skybox;
    2.  
    3. private void Start() {
    4.     RenderSettings.skybox = skybox;
    5. }
    But ambient light does not change, prior one is maintained.

    I found this manual : https://docs.unity3d.com/2023.1/Documentation/Manual/skyboxes-using.html
    But there is no Ambient Mode that has two values(RealTime, Baked) in my Unity ver 21.3

    upload_2022-12-7_3-18-42.png

    How can I fix this? TT