- Home /
time based events
How to get the materials in a plane to change based on the time on the devivce (iphone or android phone)? Thanks in advance
Answer by BerggreenDK · Jun 26, 2011 at 12:23 PM
If you use C# (you can use Javascript and Boo too ofcause) you can take a look at these examples that shows how to program C#.
DateTime is part of normal API in .NET/MONO framework. http://www.dotnetperls.com/datetime-1
Then when you have made your IF...THEN structures to check for certain rules, then you have to figure out how to replace the materials.
You can either use a texture that you load in runtime, replacing the original of the object, or just have different versions of the objects with different materials.
Depending on how often this will happen within the game, you should consider and choose the best solution fitting the situation.
Please remember to mark the correct answer, once you are satisfied with the answer. :o)
Your answer
![](https://koobas.hobune.stream/wayback/20220612122201im_/https://answers.unity.com/themes/thub/images/avi.jpg)