Instantly share code, notes, and snippets.

Embed
What would you like to do?
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