Last active
July 16, 2018 15:34
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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