Baldi's Basics Plus Glue API
Modding API for Baldi's Basics Plus
Loading...
Searching...
No Matches
BBPGlue.API.BBPAuthoring Class Referencesealed

Provides runtime authoring helpers for cloning, creating, registering, and spawning BB+ prefab-like objects. More...

Public Member Functions

BBPAuthoredPrefab Clone (string id, object? source, Action< object >? configure=null)
 Clones any Unity object and registers it as a custom BBPGlue prefab.
BBPAuthoredPrefab CloneItem (string id, BBPItemId baseItem, Action< BBPItemObject >? configure=null)
 Clones a vanilla item object by item id and registers it.
BBPAuthoredPrefab CloneNpc (string id, string baseCharacter, Action< BBPNpc >? configure=null)
 Clones a vanilla NPC prefab by BB+ character id and registers it.
BBPAuthoredPrefab ClonePickup (string id, object? basePickupPrefab, Action< BBPPickup >? configure=null)
 Clones an existing pickup prefab and registers it.
BBPAuthoredPrefab CreateItem (string id, Action< BBPItemObject > configure)
 Creates a new ItemObject ScriptableObject, configures it, and registers it.
BBPAuthoredPrefab CreateNpcFromPrefab (string id, GameObject prefab, Action< BBPNpc >? configure=null)
 Clones a provided GameObject prefab, extracts its NPC component if present, configures it, and registers the whole cloned prefab.
BBPAuthoredPrefab Get (string id)
 Gets a registered authored prefab by id.
BBPAuthoredPrefab Register (string id, object? prefab)
 Registers an already-created prefab-like object without cloning it.
object? Spawn (string id, Vector3 position)
 Finds a prefab by custom id or vanilla name and spawns it.
BBPNpcSpawnNpc (string id, Vector3 position)
 Finds a prefab by custom id or vanilla name, spawns it, and wraps it as an NPC.
BBPPickupSpawnPickup (string id, Vector3 position)
 Finds a prefab by custom id or vanilla name, spawns it, and wraps it as a pickup.

Detailed Description

Provides runtime authoring helpers for cloning, creating, registering, and spawning BB+ prefab-like objects.

Member Function Documentation

◆ Clone()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.Clone ( string id,
object? source,
Action< object >? configure = null )

Clones any Unity object and registers it as a custom BBPGlue prefab.

◆ CloneItem()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.CloneItem ( string id,
BBPItemId baseItem,
Action< BBPItemObject >? configure = null )

Clones a vanilla item object by item id and registers it.

◆ CloneNpc()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.CloneNpc ( string id,
string baseCharacter,
Action< BBPNpc >? configure = null )

Clones a vanilla NPC prefab by BB+ character id and registers it.

◆ ClonePickup()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.ClonePickup ( string id,
object? basePickupPrefab,
Action< BBPPickup >? configure = null )

Clones an existing pickup prefab and registers it.

◆ CreateItem()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.CreateItem ( string id,
Action< BBPItemObject > configure )

Creates a new ItemObject ScriptableObject, configures it, and registers it.

◆ CreateNpcFromPrefab()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.CreateNpcFromPrefab ( string id,
GameObject prefab,
Action< BBPNpc >? configure = null )

Clones a provided GameObject prefab, extracts its NPC component if present, configures it, and registers the whole cloned prefab.

◆ Get()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.Get ( string id)

Gets a registered authored prefab by id.

◆ Register()

BBPAuthoredPrefab BBPGlue.API.BBPAuthoring.Register ( string id,
object? prefab )

Registers an already-created prefab-like object without cloning it.

◆ Spawn()

object? BBPGlue.API.BBPAuthoring.Spawn ( string id,
Vector3 position )

Finds a prefab by custom id or vanilla name and spawns it.

◆ SpawnNpc()

BBPNpc? BBPGlue.API.BBPAuthoring.SpawnNpc ( string id,
Vector3 position )

Finds a prefab by custom id or vanilla name, spawns it, and wraps it as an NPC.

◆ SpawnPickup()

BBPPickup? BBPGlue.API.BBPAuthoring.SpawnPickup ( string id,
Vector3 position )

Finds a prefab by custom id or vanilla name, spawns it, and wraps it as a pickup.


The documentation for this class was generated from the following file: