…y will be set at game startup without saving to .mat file directly.
Two major changes:
I removed the OnValidate() function which calls SetShaderProperties() as this alters values inside GothicSky.mat before the game starts but should only reflect runtime changes. The SetShaderProperties() is also called during game startup which is:
WorldCreator.CreateAsync() -> InitSky() -> Interpolate() -> InterpolateSky() -> SetShaderProperties() after world is loaded and before loading screne is gone.
GothicSky was set directly on world.unity scene. Therefore we couldn't overwrite it. Now setting the value at runtime when world is fully loaded dynamically as a clone.
…y will be set at game startup without saving to .mat file directly.
Two major changes:
SetShaderProperties()
as this alters values inside GothicSky.mat before the game starts but should only reflect runtime changes. TheSetShaderProperties()
is also called during game startup which is:WorldCreator.CreateAsync() -> InitSky() -> Interpolate() -> InterpolateSky() -> SetShaderProperties()
after world is loaded and before loading screne is gone.Tests showed the sky is fine at startup.