Show / Hide Table of Contents

Class CreatureManager

Manager for handling all custom data added to the game related to creatures.
Inheritance
object
CreatureManager
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Jotunn.Managers
Assembly: Jotunn.dll
Syntax
public class CreatureManager

Fields

Name Description
CharacterLayer Unity "character" layer ID.

Properties

Name Description
Instance The singleton instance of this manager.

Methods

Name Description
AddCreature(CustomCreature) Add a CustomCreature to the game.
Checks if the custom creature is valid and unique and adds it to the list of custom creatures.
GetCreature(string) Get a custom creature by its name.
GetCreaturePrefab(string) Get a custom or vanilla creature prefab by its name.
RemoveCreature(CustomCreature) Remove a custom creature by its ref. Removes the custom recipe, too.
RemoveCreature(string) Remove a custom creature by its name.

Events

Name Description
OnCreaturesRegistered Event that gets fired after registering all custom creatures to ZNetScene. Your code will execute every time a new ZNetScene is created (on every game start). If you want to execute just once you will need to unregister from the event after execution.
OnVanillaCreaturesAvailable Event that gets fired after the vanilla creatures are in memory and available for cloning. Your code will execute every time before a new ObjectDB is copied (on every menu start). If you want to execute just once you will need to unregister from the event after execution.

Extension Methods

PrefabExtension.FixReferences(object)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾