Show / Hide Table of Contents

Class BlockPrefabInfo

Represents a block type.

Inheritance
Object
BlockPrefabInfo
Namespace: Modding.Blocks
Assembly: Assembly-CSharp.dll
Syntax
public class BlockPrefabInfo

Properties

GameObject

"Prefab" / Template GameObject of this block type.

Declaration
public GameObject GameObject { get; }
Property Value
Type Description
UnityEngine.GameObject

GhostObject

"Prefab" / Template GameObject for the ghost of this block type.

Declaration
public GameObject GhostObject { get; }
Property Value
Type Description
UnityEngine.GameObject

InternalObject

Internal representation of this block type.

WARNING: This is not part of the stable API and subject to change!

Declaration
public BlockPrefab InternalObject { get; }
Property Value
Type Description
BlockPrefab

Name

Name of the block type.

Declaration
public string Name { get; }
Property Value
Type Description
String

Type

Integer ID of this block type.

Declaration
public int Type { get; }
Property Value
Type Description
Int32

Methods

Equals(BlockPrefabInfo)

Declaration
protected bool Equals(BlockPrefabInfo other)
Parameters
Type Name Description
BlockPrefabInfo other
Returns
Type Description
Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)

From(BlockPrefab)

Returns a BlockPrefab instance from its internal representation.

Declaration
public static BlockPrefabInfo From(BlockPrefab prefab)
Parameters
Type Name Description
BlockPrefab prefab
Returns
Type Description
BlockPrefabInfo

FromId(Int32)

Get a BlockPrefab based on its internal id. Null if no prefab with the specified id can be found.

Declaration
public static BlockPrefabInfo FromId(int id)
Parameters
Type Name Description
Int32 id
Returns
Type Description
BlockPrefabInfo

FromIdModded(Guid, Int32)

Get a modded BlockPrefab with the specified modId and localId. Null if not corresponding prefab can be found.

Declaration
public static BlockPrefabInfo FromIdModded(Guid modId, int localId)
Parameters
Type Name Description
Guid modId
Int32 localId
Returns
Type Description
BlockPrefabInfo

GetAll()

Returns all currently loaded block types.

Declaration
public static BlockPrefabInfo[] GetAll()
Returns
Type Description
BlockPrefabInfo[]

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()

GetOfficial(BlockType)

Get an official BlockPrefab from its BlockType value.

Declaration
public static BlockPrefabInfo GetOfficial(BlockType type)
Parameters
Type Name Description
BlockType type
Returns
Type Description
BlockPrefabInfo

ToString()

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

Operators

Equality(BlockPrefabInfo, BlockPrefabInfo)

Declaration
public static bool operator ==(BlockPrefabInfo left, BlockPrefabInfo right)
Parameters
Type Name Description
BlockPrefabInfo left
BlockPrefabInfo right
Returns
Type Description
Boolean

Inequality(BlockPrefabInfo, BlockPrefabInfo)

Declaration
public static bool operator !=(BlockPrefabInfo left, BlockPrefabInfo right)
Parameters
Type Name Description
BlockPrefabInfo left
BlockPrefabInfo right
Returns
Type Description
Boolean
Back to top Generated by DocFX