Creating and using prefabs

Last edit by Luffy, 08-03-2017, 11:57 AM.

In the new version of the editor the prefab system got completely rewritten and improved, it now supports elements and almost any spawnable unit, it's even capable of keeping the relationship of the elements for later use making it a perfect system for premade assault elements and more, the prefabs are now saved as a "prefab" file inside Maps/prefabs which is a binary file(scriptdata) that contains the needed information to spawn the prefab this is instead of saving them in the options which was extremely unstable.

Creating prefabs is very easy. However, creating the content itself is up to the creator of the prefab.

So you loaded a level and created something you want to use later or upload to modworkshop in the prefabs category?

Here's how you make it a prefab

Select the units and elements you want to make into a prefab in the editor

Press Create Prefab, this should open a dialog for the name of the prefab and it has a toggle to whether you want to keep or remove the old links of the elements(Old links are any elements that are not going to be in the prefab for example, an element id inside on executed that is not part of the prefab, by default this will remove them because prefabs are meant to be used in multiple heists) after you're done press apply and this will create the prefab.

And done your prefab is ready and was added to your prefabs(for uploading it just upload the prefab file from Maps/prefabs/prefabname.prefab and tell people to drop it to Maps/prefabs to use it)

Spawning a prefab

After creating the prefab you should be able to spawn it instantly from the prefab list. go to utilities menu and press prefab below spawn

this will open a list with all of your prefabs, select any, if anything is unloaded the editor will notify you and will ask you to load them.

and done the prefab is spawned!