Skip to main content
Portal Documentation
Discord GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Spawn Object

Battlefield 6 Scripting Docs


Battlefield 6 Scripting Docs / mod / mod / SpawnObject

Function: SpawnObject()

Call Signature

function SpawnObject(
   prefabEnum, 
   position, 
   rotation, 
   scale): any;

Defined in: mod/index.d.ts:21607

Spawns an object at runtime. Returns an object id if the object supports it, otherwise -1

Parameters

Returns

any

Call Signature

function SpawnObject(
   prefabEnum, 
   position, 
   rotation): any;

Defined in: mod/index.d.ts:21632

Spawns an object at runtime. Returns an object id if the object supports it, otherwise -1

Parameters

Returns

any