Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Last active November 30, 2017 11:00
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/0530f6ad4ee1d85bf2f1222d96a24a07 to your computer and use it in GitHub Desktop.
Save ronyx69/0530f6ad4ee1d85bf2f1222d96a24a07 to your computer and use it in GitHub Desktop.
Sets color variations in asset editor.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; // BuildingInfo PropInfo VehicleInfo
var color1 = new Color32(255, 255, 255, 255);
var color2 = new Color32(255, 255, 255, 255);
var color3 = new Color32(255, 255, 255, 255);
var color4 = new Color32(255, 255, 255, 255);
asset.m_material.SetColor("_ColorV0", color1);
asset.m_material.SetColor("_ColorV1", color2);
asset.m_material.SetColor("_ColorV2", color3);
asset.m_material.SetColor("_ColorV3", color4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment