Spawning Prefabs

Has anyone had any luck with spawning prefabs? Every time I try spawning one it doesn’t function even though the prefab is defined correctly. I was able to recreate the bed without using a prefab, but the campfire doesn’t have a dedicated class so I was hoping to use a prefab instead.

Here you can see it has the smartobject helper, guidSmartObjectType, and AI category defined, so I’m not sure why it doesn’t work…

I think I figured out the issue, but I have no idea how to solve it. The “WUID” is non-existent on the spawned prefabs. If anyone runs across this thread and knows of a way to assign a WUID to an entity please let me know. Thanks :slight_smile:

UPDATE:
Game.SpawnPrefab() never generates a WUID and System.SpawnEntity() sometimes will, but not always. Two of the main components - ProceduralObject (fire), and the SequenceTrigger both did not generate a WUID with either spawn method. It looks like it will be impossible to spawn a “functioning” campfire unless someone knows a way to assign a WUID to an entity.

I’ll be using a workaround instead and teleporting an existing fireplace.

1 Like

Do you work on a portable camp Mod? That would be nice! :slightly_smiling_face: