Class BlockPrefabInfo
Inheritance
BlockPrefabInfo
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
Declaration
public string Name { get; }
Property Value
Type
Integer ID of this block type.
Declaration
Property Value
Methods
Equals(BlockPrefabInfo)
Declaration
protected bool Equals(BlockPrefabInfo other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
From(BlockPrefab)
Returns a BlockPrefab instance from its internal representation.
Declaration
public static BlockPrefabInfo From(BlockPrefab prefab)
Parameters
Type |
Name |
Description |
BlockPrefab |
prefab |
|
Returns
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
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
GetAll()
Returns all currently loaded block types.
Declaration
public static BlockPrefabInfo[] GetAll()
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
GetOfficial(BlockType)
Get an official BlockPrefab from its BlockType value.
Declaration
public static BlockPrefabInfo GetOfficial(BlockType type)
Parameters
Type |
Name |
Description |
BlockType |
type |
|
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
Equality(BlockPrefabInfo, BlockPrefabInfo)
Declaration
public static bool operator ==(BlockPrefabInfo left, BlockPrefabInfo right)
Parameters
Returns
Inequality(BlockPrefabInfo, BlockPrefabInfo)
Declaration
public static bool operator !=(BlockPrefabInfo left, BlockPrefabInfo right)
Parameters
Returns