Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Prefab.instantiate() seems to not use the same material instance as the prefab. #149
I've created a simple computecolor shader that will change the color depending on the x position of the camera.
I created a prefab with a material that has this shader on it.
The shader only responds to the camera position if the prefab was added to the scene using the scene editor, or the prefab was added directly to the scene (not instantiated.)
If I use prefab.instantiate and add the objects that this creates to the scene, they don't respond to the camera position.