|
Baldi's Basics Plus Glue API
Modding API for Baldi's Basics Plus
|
Utility for loading and registering assets like sprites, audio clips, and sound objects. More...
Public Member Functions | |
| void | Clear () |
| Clears all registered assets from the loader. | |
| BBPSoundObject? | CreateSound (string id, AudioClip clip, string key="", string soundType="Effect", float volume=1f, bool subtitle=false) |
| Creates a sound object from an AudioClip and registers it under the given identifier. | |
| object? | CreateSoundObject (AudioClip clip, string key="", string soundType="Effect", float volume=1f, bool subtitle=false) |
| Creates a raw sound object from the given AudioClip and parameters. | |
| AudioClip? | GetAudioClip (string id) |
| Retrieves a registered audio clip by identifier. | |
| BBPSoundObject? | GetSound (string id) |
| Retrieves a registered sound object by identifier. | |
| Sprite? | GetSprite (string id) |
| Retrieves a registered sprite by identifier. | |
| IEnumerator | LoadAudioClip (string id, string path, AudioType audioType, Action< AudioClip?> callback) |
| Asynchronously loads an audio clip from the given path and registers it under the provided id. | |
| IEnumerator | LoadAudioClip (string path, AudioType audioType, Action< AudioClip?> callback) |
| Asynchronously loads an audio clip from a file path. | |
| Sprite? | LoadSprite (string id, string path, float pixelsPerUnit=100f) |
| Loads a sprite from disk and registers it under the given identifier. | |
| Sprite? | LoadSprite (string path, float pixelsPerUnit=100f) |
| Loads a sprite from a file path. | |
| void | RegisterAudioClip (string id, AudioClip clip) |
| Registers an audio clip with the given identifier. | |
| void | RegisterSound (string id, BBPSoundObject sound) |
| Registers a sound object with the given identifier. | |
| void | RegisterSprite (string id, Sprite sprite) |
| Registers a sprite with the given identifier. | |
| bool | RemoveAudioClip (string id) |
| Removes a registered audio clip by identifier. | |
| bool | RemoveSound (string id) |
| Removes a registered sound by identifier. | |
| bool | RemoveSprite (string id) |
| Removes a registered sprite by identifier. | |
Properties | |
| IReadOnlyDictionary< string, AudioClip > | AudioClips [get] |
| Gets a read-only view of registered audio clips. | |
| IReadOnlyDictionary< string, BBPSoundObject > | Sounds [get] |
| Gets a read-only view of registered sound objects. | |
| IReadOnlyDictionary< string, Sprite > | Sprites [get] |
| Gets a read-only view of registered sprites. | |
Utility for loading and registering assets like sprites, audio clips, and sound objects.
| void BBPGlue.API.BBPAssetLoader.Clear | ( | ) |
Clears all registered assets from the loader.
| BBPSoundObject? BBPGlue.API.BBPAssetLoader.CreateSound | ( | string | id, |
| AudioClip | clip, | ||
| string | key = "", | ||
| string | soundType = "Effect", | ||
| float | volume = 1f, | ||
| bool | subtitle = false ) |
Creates a sound object from an AudioClip and registers it under the given identifier.
| id | The identifier to register the created sound under. |
| clip | The audio clip to use for the sound. |
| key | An optional key identifying the sound. |
| soundType | The sound type as string (e.g., "Effect"). |
| volume | Volume multiplier for the sound. |
| subtitle | Whether the sound should show subtitles. |
| object? BBPGlue.API.BBPAssetLoader.CreateSoundObject | ( | AudioClip | clip, |
| string | key = "", | ||
| string | soundType = "Effect", | ||
| float | volume = 1f, | ||
| bool | subtitle = false ) |
Creates a raw sound object from the given AudioClip and parameters.
| clip | The audio clip to use. |
| key | An optional key identifying the sound. |
| soundType | The sound type as a string. |
| volume | Volume multiplier for the sound. |
| subtitle | Whether the sound should display subtitles. |
| AudioClip? BBPGlue.API.BBPAssetLoader.GetAudioClip | ( | string | id | ) |
Retrieves a registered audio clip by identifier.
| id | The identifier of the audio clip. |
| BBPSoundObject? BBPGlue.API.BBPAssetLoader.GetSound | ( | string | id | ) |
Retrieves a registered sound object by identifier.
| id | The identifier of the sound. |
| Sprite? BBPGlue.API.BBPAssetLoader.GetSprite | ( | string | id | ) |
Retrieves a registered sprite by identifier.
| id | The identifier of the sprite. |
| IEnumerator BBPGlue.API.BBPAssetLoader.LoadAudioClip | ( | string | id, |
| string | path, | ||
| AudioType | audioType, | ||
| Action< AudioClip?> | callback ) |
Asynchronously loads an audio clip from the given path and registers it under the provided id.
| id | The identifier to register the loaded clip under. |
| path | The filesystem path to the audio file. |
| audioType | The audio type to use when loading. |
| callback | Callback invoked with the loaded AudioClip, or null on failure. |
| IEnumerator BBPGlue.API.BBPAssetLoader.LoadAudioClip | ( | string | path, |
| AudioType | audioType, | ||
| Action< AudioClip?> | callback ) |
Asynchronously loads an audio clip from a file path.
| path | The filesystem path to the audio file. |
| audioType | The audio type to use when loading. |
| callback | Callback invoked with the loaded AudioClip, or null on failure. |
| Sprite? BBPGlue.API.BBPAssetLoader.LoadSprite | ( | string | id, |
| string | path, | ||
| float | pixelsPerUnit = 100f ) |
Loads a sprite from disk and registers it under the given identifier.
| id | The identifier to register the loaded sprite under. |
| path | The filesystem path to the image file. |
| pixelsPerUnit | Pixels per unit for the created sprite. |
| Sprite? BBPGlue.API.BBPAssetLoader.LoadSprite | ( | string | path, |
| float | pixelsPerUnit = 100f ) |
Loads a sprite from a file path.
| path | The filesystem path to the image file. |
| pixelsPerUnit | Pixels per unit used when creating the sprite. |
| void BBPGlue.API.BBPAssetLoader.RegisterAudioClip | ( | string | id, |
| AudioClip | clip ) |
Registers an audio clip with the given identifier.
| id | The identifier for the audio clip. |
| clip | The audio clip to register. |
| void BBPGlue.API.BBPAssetLoader.RegisterSound | ( | string | id, |
| BBPSoundObject | sound ) |
Registers a sound object with the given identifier.
| id | The identifier for the sound. |
| sound | The sound object to register. |
| void BBPGlue.API.BBPAssetLoader.RegisterSprite | ( | string | id, |
| Sprite | sprite ) |
Registers a sprite with the given identifier.
| id | The identifier for the sprite. |
| sprite | The sprite to register. |
| bool BBPGlue.API.BBPAssetLoader.RemoveAudioClip | ( | string | id | ) |
Removes a registered audio clip by identifier.
| id | The identifier of the audio clip to remove. |
| bool BBPGlue.API.BBPAssetLoader.RemoveSound | ( | string | id | ) |
Removes a registered sound by identifier.
| id | The identifier of the sound to remove. |
| bool BBPGlue.API.BBPAssetLoader.RemoveSprite | ( | string | id | ) |
Removes a registered sprite by identifier.
| id | The identifier of the sprite to remove. |
|
get |
Gets a read-only view of registered audio clips.
|
get |
Gets a read-only view of registered sound objects.
|
get |
Gets a read-only view of registered sprites.