Change the shader of a building sub mesh to prop default in asset editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var subMesh = 0; // sub mesh id, order as in ui, starting from 0 | |
var shader = Shader.Find("Custom/Props/Prop/Default"); // the shader to use | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; | |
asset.m_subMeshes[subMesh].m_subInfo.m_material.shader = shader; | |
asset.m_subMeshes[subMesh].m_subInfo.m_lodMaterial.shader = shader; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment