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
| var subMesh = 0; // sub mesh id, order as in ui, starting from 0 | |
| var shader = Shader.Find("Custom/Props/Prop/Default"); // the shader to use | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; | |
| asset.m_subMeshes[subMesh].m_subInfo.m_material.shader = shader; | |
| asset.m_subMeshes[subMesh].m_subInfo.m_lodMaterial.shader = shader; |
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
| //---------------------------------------------------------------- | |
| // Tree Variation Amount Changer | |
| // Set amount of Tree variations. | |
| // If you are increasing the amount, previous variations will be preserved. | |
| // If decreasing, all variations will be removed! | |
| var variations = 12; //CHANGE THIS |
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
| // Tree Wind Sway Recalculator (Central) | |
| // Recalculates vertex colors based on the proximity to center. | |
| // Allows limiting sway with an adjustable multiplier. | |
| var sway = 0.2f; // Sway multiplier 0.0 (none) to 1.0 (max) | |
| var bias = 1.6f; // "Contrast" between center and outer parts, | |
| // increasing this will make the middle more static, | |
| // and the outside move more. |
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
| // Tree Wind Sway Recalculator | |
| // Recalculates vertex colors based on the height. | |
| // Allows limiting sway with an adjustable multiplier. | |
| var sway = 0.69f; // Sway multiplier 0.0 (none) to 1.0 (max) | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as TreeInfo; | |
| Vector3[] vertices = asset.m_mesh.vertices; Color[] colors = new Color[vertices.Length]; | |
| for (int i = 0; i < vertices.Length; i++) |
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
| var shader = Shader.Find("Custom/Props/Prop/Fence"); | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| if(asset.m_material != null) asset.m_material.shader = shader; | |
| if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader; | |
| asset.m_requireHeightMap = true; |
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
| var shader = Shader.Find("Custom/Props/Prop/Default"); | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| if(asset.m_material != null) asset.m_material.shader = shader; | |
| if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader; | |
| asset.m_requireHeightMap = false; |
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
| var shader = Shader.Find("Custom/Buildings/Building/Floating"); | |
| 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; |
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
| var shader = Shader.Find("Custom/Buildings/Building/Fence"); | |
| 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; | |
| asset.m_requireHeightMap = true; |
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
| var shader = Shader.Find("Custom/Buildings/Building/Default"); | |
| 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; | |
| asset.m_requireHeightMap = false; |
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
| // props | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
| asset.m_UIPriority = 1; | |
| // trees | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as TreeInfo; | |
| asset.m_UIPriority = 1; | |
| // buildings |