- Home /
Water4 with different properties across different scenes
Hi,
I'm using the Water4example shader an scripts to create water in my game however I have different scenes with different worlds that will use different properties on the water to make it look different, eg. calm water and stormy water. My problem is when I change the properties of the Water4Example (Advanced) in one scene that change propagates to al other scenes so the properties and hence the water looks the same. I wonder if it has anything to do with static variables or something but I think I shouldn't need to make copies of the shaders and scripts in order to reuse them with different properties within the same game.
I hope and think I may have missed something obvious here.
Thanks in advance!
/Johan I
Answer by getyour411 · May 18, 2014 at 02:49 PM
Static vars do that. You do need to change those to reuse them with different properties and that's not a Unity issue, that's the language.
Your answer
Follow this Question
Related Questions
pre generated static Object in C# 1 Answer
Is there some way to make a property return a static value if the object is null/does not exist? 2 Answers
How to list all the properties and methods from the class? 1 Answer
Using static properties that return _instance.variable... 0 Answers
how to make easily accessible classes. the type like Unity has in JS for example. 1 Answer