Show / Hide Table of Contents

Constructor CustomItem

| Edit this page View Source

CustomItem(GameObject, bool)

Custom item from a prefab.
Can fix references for Mock<T>s and the Recipe.
Declaration
public CustomItem(GameObject itemPrefab, bool fixReference)
Parameters
Type Name Description
GameObject itemPrefab The prefab for this custom item.
bool fixReference If true references for Mock<T> objects get resolved at runtime by Jötunn.
| Edit this page View Source

CustomItem(GameObject, bool, ItemConfig)

Custom item from a prefab with a Recipe made from a ItemConfig.
Can fix references for Mock<T>s.
Declaration
public CustomItem(GameObject itemPrefab, bool fixReference, ItemConfig itemConfig)
Parameters
Type Name Description
GameObject itemPrefab The prefab for this custom item.
bool fixReference If true references for Mock<T> objects get resolved at runtime by Jötunn.
ItemConfig itemConfig The item config for this custom item.
| Edit this page View Source

CustomItem(string, bool)

Custom item created as an "empty" primitive.
At least the name and the Icon of the ItemDrop must be edited after creation.
Declaration
public CustomItem(string name, bool addZNetView)
Parameters
Type Name Description
string name Name of the new prefab. Must be unique.
bool addZNetView If true a ZNetView component will be added to the prefab for network sync.
| Edit this page View Source

CustomItem(string, bool, ItemConfig)

Custom item created as an "empty" primitive with a Recipe made from a ItemConfig.
Declaration
public CustomItem(string name, bool addZNetView, ItemConfig itemConfig)
Parameters
Type Name Description
string name Name of the new prefab. Must be unique.
bool addZNetView If true a ZNetView component will be added to the prefab for network sync.
ItemConfig itemConfig The item config for this custom item.
| Edit this page View Source

CustomItem(string, string)

Custom item created as a copy of a vanilla Valheim prefab.
Declaration
public CustomItem(string name, string basePrefabName)
Parameters
Type Name Description
string name The new name of the prefab after cloning.
string basePrefabName The name of the base prefab the custom item is cloned from.
| Edit this page View Source

CustomItem(string, string, ItemConfig)

Custom item created as a copy of a vanilla Valheim prefab with a Recipe made from a ItemConfig.
Declaration
public CustomItem(string name, string basePrefabName, ItemConfig itemConfig)
Parameters
Type Name Description
string name The new name of the prefab after cloning.
string basePrefabName The name of the base prefab the custom item is cloned from.
ItemConfig itemConfig The item config for this custom item.
| Edit this page View Source

CustomItem(AssetBundle, string, bool, ItemConfig)

Custom item from a prefab loaded from an AssetBundle with a Recipe made from a ItemConfig.
Can fix references for Mock<T>s.
Declaration
public CustomItem(AssetBundle assetBundle, string assetName, bool fixReference, ItemConfig itemConfig)
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.
ItemConfig itemConfig The item config for this custom item.
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾