StatusEffectDatabase
Description
For most use cases the StatusEffectDatabase can be ignored as it automatically handles adding and removing StatusEffectDatas. However, if dynamically adding and removing from the database is desired (for example with addressables) it can easily be done. To begin changing the database simply call the static method StatusEffectDatabase.Get(). The asset will always be located in the Assets/Resources/
folder.
For Netcode, additional work will need to be done to sync across client and server. A sample for how this could be done would closely resemble Unity's sample for dynamic prefab loading.
Properties
ReadOnlyDictionary
A read only reference to the values in the database.
Methods
Returns a reference to the StatusEffectDatabase.
Adds a StatusEffectData to the database.
Adds a StatusEffectData to the database.
Extension of CollectionExtensions GetValueOrDefault.
Extension of Dictionary TryGetValue.
Extension of Dictionary ContainsKey.
Inverse of ContainsKey.
Last updated