Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Last active May 8, 2018 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronyx69/ce0ec6b39ab7a5c379dea8e10a4686f5 to your computer and use it in GitHub Desktop.
Save ronyx69/ce0ec6b39ab7a5c379dea8e10a4686f5 to your computer and use it in GitHub Desktop.
Change the shader of a building to Floating in asset editor.
var shader = Shader.Find("Custom/Buildings/Building/Floating");
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo;
if(asset.m_material != null) asset.m_material.shader = shader;
if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment