Constructor CustomCreature
| Improve this Doc View SourceCustomCreature(GameObject, bool)
Custom creature from a prefab.
Declaration
public CustomCreature(GameObject creaturePrefab, bool fixReference)
Parameters
Type | Name | Description |
---|---|---|
GameObject | creaturePrefab | The prefab of this custom creature. |
bool | fixReference | If true references for Mock<T> objects get resolved at runtime by Jötunn. |
CustomCreature(GameObject, bool, CreatureConfig)
Custom creature from a prefab with a CreatureConfig attached.
Declaration
public CustomCreature(GameObject creaturePrefab, bool fixReference, CreatureConfig creatureConfig)
Parameters
Type | Name | Description |
---|---|---|
GameObject | creaturePrefab | The prefab of this custom creature. |
bool | fixReference | If true references for Mock<T> objects get resolved at runtime by Jötunn. |
CreatureConfig | creatureConfig | The CreatureConfig for this custom creature. |
CustomCreature(string, string, CreatureConfig)
Custom creature created as a copy of a vanilla Valheim creature.
SpawnData is not cloned, you will have to add SpawnConfigs to your CreatureConfig if you want to spawn the cloned creature automatically.
SpawnData is not cloned, you will have to add SpawnConfigs to your CreatureConfig if you want to spawn the cloned creature automatically.
Declaration
public CustomCreature(string name, string basePrefabName, CreatureConfig creatureConfig)
Parameters
Type | Name | Description |
---|---|---|
string | name | The new name of the creature after cloning. |
string | basePrefabName | The name of the base prefab the custom creature is cloned from. |
CreatureConfig | creatureConfig | The CreatureConfig for this custom creature. |
CustomCreature(AssetBundle, string, bool, CreatureConfig)
Custom creature from a prefab loaded from an AssetBundle with a PieceConfig attached.
The members and references from the PieceConfig will be referenced by Jötunn at runtime.
The members and references from the PieceConfig will be referenced by Jötunn at runtime.
Declaration
public CustomCreature(AssetBundle assetBundle, string assetName, bool fixReference, CreatureConfig creatureConfig)
Parameters
Type | Name | Description |
---|---|---|
AssetBundle | assetBundle | A preloaded AssetBundle |
string | assetName | Name of the prefab in the bundle. |
bool | fixReference | If true references for Mock<T> objects get resolved at runtime by Jötunn. |
CreatureConfig | creatureConfig | The CreatureConfig for this custom creature. |