Skip to content

Instantly share code, notes, and snippets.

@TimTheTerribleCS
Created October 5, 2016 16:51
Show Gist options
  • Save TimTheTerribleCS/122c5aeef0469cf1a000ced7892b73b0 to your computer and use it in GitHub Desktop.
Save TimTheTerribleCS/122c5aeef0469cf1a000ced7892b73b0 to your computer and use it in GitHub Desktop.
var shader = Shader.Find("Custom/Net/Electricity");
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