Hey great mod I just have an question do you mind sharing the code I really want to make an map expansion mod but idk how to code I want to make an factory
If you use a mesh collider, make sure you apply it to the same object that also has the mesh renderer and why do you need a rigidbody for the factory, if its just a static object on the map. if you model floats just move it down a little bit
22 comments
https://github.com/piotrulos/MSCModLoader/wiki/How-to-create-and-use-Asset-Bundles
After that you can spawn it like this
private void Mod_OnLoad()
{
AssetBundle ab = LoadAssets.LoadBundle(this, "mcdonald’s.unity3d");
GameObject mcd;
mcd = ab.LoadAsset<GameObject>("McDonalds.prefab");
MonoBehaviour.Instantiate(mcd);
}