Show / Hide Table of Contents

Class CustomPrefab

Wrapper for custom added GameObjects holding the mod reference.
Inheritance
System.Object
CustomEntity
CustomPrefab
Inherited Members
CustomEntity.SourceMod
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 Source

CustomPrefab(GameObject, Boolean)

Custom prefab.
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 Source

FixReference

Indicator if references from Mock<T>s will be replaced at runtime.
Declaration
public bool FixReference { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Prefab

Original prefab
Declaration
public GameObject Prefab { get; }
Property Value
Type Description
GameObject

Methods

| Improve this Doc View Source

IsCustomPrefab(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.
| Improve this Doc View Source

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
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Extension Methods

PrefabExtension.FixReferences(Object)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾