Zainstaluj Steam
zaloguj się
|
język
简体中文 (chiński uproszczony)
繁體中文 (chiński tradycyjny)
日本語 (japoński)
한국어 (koreański)
ไทย (tajski)
български (bułgarski)
Čeština (czeski)
Dansk (duński)
Deutsch (niemiecki)
English (angielski)
Español – España (hiszpański)
Español – Latinoamérica (hiszpański latynoamerykański)
Ελληνικά (grecki)
Français (francuski)
Italiano (włoski)
Bahasa Indonesia (indonezyjski)
Magyar (węgierski)
Nederlands (niderlandzki)
Norsk (norweski)
Português (portugalski – Portugalia)
Português – Brasil (portugalski brazylijski)
Română (rumuński)
Русский (rosyjski)
Suomi (fiński)
Svenska (szwedzki)
Türkçe (turecki)
Tiếng Việt (wietnamski)
Українська (ukraiński)
Zgłoś problem z tłumaczeniem
// "Custom/Props/Decal/Blend"
// "Custom/Props/Decal/Solid"
// "Custom/Props/Prop/Fence"
// "Custom/Props/Prop/Default"
var shader = Shader.Find("Custom/Props/Prop/Fence");
// set this to true if the prop should conform to the terrain, otherwise false
var requireHeightMap = true;
// --- end of settings ---
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
if(asset == null) { Debug.Log("Error: Not a prop!"); return; }
asset.m_requireHeightMap = requireHeightMap;
if(asset.m_material != null) asset.m_material.shader = shader;
if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader;
The prop should now adapt to the terrain, you can save it as normal.
Thanks to boformer for help with the script. It can also be used to create decals but I haven't experimented with that yet.
Enable mod tools
Load the prop into the asset editor as usual, set colour variation etc. as normal.
Before you save press F7, which should bring up mod tools.
Paste the following script into the dialogue box and press enter: