I have a code that loads prefabs from folder like this :
void InitAddableObjects ()
{
addableObjects = Resources.LoadAll<GameObject>("LevelObjects/");
if (addableObjects != null) {
foreach (var item in addableObjects) {
string tag = item.tag;
if (!tag.Equals(startPointObjTAG)) {
item.tag = addedObjTAG;
}
}
}
else {
Debug.LogError ("No objects!");
}
}
All these prefabs are created in Editor.
I need to find a way to add more objects (from .fbx files) there at run-time but I don’t have a slightest clue on how to do that. All the objects are random furniture models and nothing else.