Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Last active July 16, 2018 15:34
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/459f32f2feb087e8c734f050b01b236e to your computer and use it in GitHub Desktop.
Save ronyx69/459f32f2feb087e8c734f050b01b236e to your computer and use it in GitHub Desktop.
Scripts for props and trees for the Detail mod. Mod is not required for creating and saving the asset.
// Detail Script
// Tags a prop as detail prop for custom render distance and optional color matching.
var lod = 100f; // Distance at which LOD appears.
var max = 200f; // Distance at which the prop disappears.
var vegetation = true; // Set to true for color variations override according to Detail mod settings.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
if (vegetation) {
asset.m_material.name = "DetailMod_Vegetation " + lod.ToString("R") + " " + max.ToString("R");
asset.m_useColorVariations = true; }
else asset.m_material.name = "DetailMod_ " + lod.ToString("R") + " " + max.ToString("R");
// Detail Script
// Tags a tree as detail tree for color matching.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as TreeInfo;
asset.m_material.name = "DetailMod_Tree";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment