ModAPI Hub keyboard_arrow_right Mods keyboard_arrow_right Stair


Subscribe to this mod
This mod requires BuilderMenu and BuilderCore and this file
Put the file in The Forest/Mods/Meshes/

using ModAPI; using UnityEngine; using BuilderCore; using BuilderMenu; using System.Collections.Generic; using TheForest.Items; using System.Collections; using ModAPI.Attributes; namespace Stair { public class Main : MonoBehaviour { [ExecuteOnGameStart] public static void AddMe() { new GameObject("StairStuff").AddComponent(); } public void Start() { Mesh m = Core.ReadMeshFromOBJ("Mods/Meshes/untitled.OBJ"); ModAPI.Log.Write(m.ToString()); Building b = new Building() { data = new BuildingData[] { new BuildingData() { mesh= m, MainColor = Color.cyan, EmissionColor = Color.cyan, AddCollider=true, Convex=true, } } }; Core.AddBuilding(b, 333); Dictionary ing = new Dictionary(); ing.Add(ItemDatabase.ItemIdByName("Rock"), 10); ing.Add(ItemDatabase.ItemIdByName("bone"), 2); ListItem I = new ListItem() { AuthorName = "Hazard", Category = "Stairs", Description = "This is a staircase, its full of steps", Image = ModAPI.Resources.GetTexture("img.png"), Ingredients = ing, ModName = "Stair", Name = "Staircase 1", PrefabID = 333 }; EditorMethods.AddBuilding(I); Destroy(gameObject); } } }
File Stair-
Compatible 1.09

videogame_asset The Forest label Bugfixes
  • Version (1.09) 26. Aug 2018
    143.15 kB


Downloading ModAPI...

Your download is ready!
What now?

This website uses cookies

We use cookies to personalise content and ads. We also share information about your use of our site with our advertising partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.
You consent to our cookies if you continue to use our website.

Necessary settings, user session

Google AdSense: Google AdSense (integration of advertisements) places a cookie on the information technology system of the data subject.

Learn more about the cookies we use here.
To opt-out later click here.