Select to view content in your preferred language

Change material by layer

218
2
3 weeks ago
BenGiese
New Contributor II

Hi, 

I want to change the material/shader for a scene layer in my unity project. When I import a Scene layer it automatically gets connected to the SceneNodeSurface shader. Since I have trees and buildings in my scenes. i have buildings and trees in my unity scene but I want a different shader for the trees than the sceneNodeSurface. But it seems when i click on a tree and change the material it gets reseted after a certain time. 

is there a way to change the material by layer? A saw a change material by attribute sample but I want to change it by layer and not by attribute

best regards

Ben

Tags (2)
0 Kudos
2 Replies
SNauman
New Contributor III

Hi, you could change the scene node surface shader itself, or update the code in specific places to point to the shader you want to use. Search for where the shader is used to update the refs.

Hope that helps, let me know if you have any specific questions

0 Kudos
BenGiese
New Contributor II

Hello, thank you for your answer. if I update the shader itself the trees get visualized correct but the buildings display in a wrong way. Since i used the map creator and not the api I dont know how to script that part that the trees get displayed in a different way. I think i would need to set up everything again but this time using the api.

 

0 Kudos