Some simple tests at how I can change materials using C# in Unity
As I want to create a 3D environment that changes around the viewer, I have been experimenting with different pieces of code that change the material on an object.
These are very basic prototypes to show some of the experiments I have been doing to test what kinds of code I can implement into my scene.
Although I am aware there will need to be tweaks if I want this to work in VR I believe this is has been a useful test of how I could manipulate the environment around the player.
The left cube changes it's material when th mouse comes into object with the object, while the right cube has a 'lerp' script applied to it that automatically changes the cubes material on startup.
By Rachel Nixon
Email Rachel Nixon
Published On: 24/03/2018