Search Issue Tracker

Active

Under Consideration for 2022.3.X, 6000.0.X

Votes

0

Found in

2022.3.62f1

6000.0.50f1

6000.1.4f1

Issue ID

UUM-107787

Regression

No

Script resets to use the previous Skybox color when saving the Scene changes

-

Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Dev Dunk Studio/Screen Space Fog/Samples/Scenes/Sample.unity” Scene
3. In Hierarchy, select Manager GameObject
4. In Inspector, disable “Replace Skybox“
5. Click on Scene view
6. Press “CTRL“ + “S” keys to save

Expected result: Change is saved, and a blue sky is present
Actual result: Skybox is reset to white, but “Replace Skybox” is disabled

Reproducible with: 2022.3.62f1, 6000.0.50f1, 6000.1.4f1, 6000.2.0a8 (8a36f491c000)
Not reproducible with: 6000.2.0b3
Fixed in: 6000.2.0a9 (2aeb7e9a02a2)

Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

Note:
- Sometimes the script settings do not show in the Inspector for the Manager GameObject

Comments (4)

  1. DevDunk

    Oct 14, 2025 13:36

    For keyword enums you need to set an int to the base keyword value.

    So if you have
    _ _KEYWORD_ONE, _KEYWORD_TWO, _KEYWORD_THREE

    And you need to enable keyword three in the enum, you need to disable all keywords, then enable '_KEYWORD_THREE', and then set the int _KEYWORD to 2

  2. DevDunk

    Oct 14, 2025 13:20

    I found that you need to set an int with the same name as the keyword in order for the changes to save… Please fix this

    if (replaceSkybox)
    {
    material.EnableKeyword(ShaderIDs.ReplaceSkyboxKeyword);
    material.SetInt("_REPLACE_SKYBOX", 1); //REQUIRED TO SAVE CHANGE
    }
    else
    {
    material.DisableKeyword(ShaderIDs.ReplaceSkyboxKeyword);
    material.SetInt("_REPLACE_SKYBOX", 0); //REQUIRED TO SAVE CHANGE
    }

  3. DevDunk

    Oct 06, 2025 09:23

    This seems to only happen when setting keywords, not when setting float values etc

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.