Class CustomPrefab
Wrapper for custom added GameObjects holding the mod reference.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Jotunn.Entities
Assembly: Jotunn.dll
Syntax
public class CustomPrefab : CustomEntity
Constructors
| Improve this Doc View SourceCustomPrefab(GameObject, Boolean)
Custom prefab.
Can fix references for Mock<T>s.
Can fix references for Mock<T>s.
Declaration
public CustomPrefab(GameObject prefab, bool fixReference)
Parameters
Type | Name | Description |
---|---|---|
GameObject | prefab | The prefab for this custom item. |
System.Boolean | fixReference | If true references for Mock<T> objects get resolved at runtime by Jötunn. |
Properties
| Improve this Doc View SourceFixReference
Indicator if references from Mock<T>s will be replaced at runtime.
Declaration
public bool FixReference { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Prefab
Original prefab
Declaration
public GameObject Prefab { get; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
| Improve this Doc View SourceIsCustomPrefab(String)
Helper method to determine if a prefab with a given name is a custom prefab created with Jötunn.
Declaration
public static bool IsCustomPrefab(string prefabName)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefabName | Name of the prefab to test. |
Returns
Type | Description |
---|---|
System.Boolean | true if the prefab is added as a custom prefab to the PrefabManager. |
IsValid()
Checks if a custom item is valid (i.e. has a prefab, an and an icon, if it should be craftable).
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
System.Boolean | true if all criteria is met |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()