Represents a generalized reference to an entity prototype - either EntityPrototype asset or an entity from Map. More...
Inherits IEquatable< EntityPrototypeRef >.
Public Member Functions | |
readonly bool | Equals (EntityPrototypeRef other) |
readonly override bool | Equals (object obj) |
readonly override int | GetHashCode () |
readonly override string | ToString () |
Returns a string that represents the current EntityPrototypeRef in the format of: More... | |
Static Public Member Functions | |
static EntityPrototypeRef | FromMasterAsset (AssetRef< Map > asset, int internalAssetId) |
Creates a new entity prototype reference from an entity in a map asset. More... | |
static EntityPrototypeRef | FromMasterAsset (Map asset, int internalAssetId) |
Creates a new entity prototype reference from an entity in a map asset. More... | |
static EntityPrototypeRef | FromPrototypeAsset (AssetRef< EntityPrototype > prototype) |
static EntityPrototypeRef | FromPrototypeAsset (EntityPrototype prototype) |
Creates a new entity prototype reference from an entity prototype asset. More... | |
static bool | operator!= (EntityPrototypeRef a, EntityPrototypeRef b) |
static bool | operator== (EntityPrototypeRef a, EntityPrototypeRef b) |
static void | Serialize (void *ptr, FrameSerializer stream) |
Public Attributes | |
AssetRef | Asset |
The asset reference of EntityPrototype or Map. More... | |
int | InnerAssetId |
If the entity prototype reference comes from a map asset, this is the index of the entity in the map. More... | |
readonly bool | IsValid => Asset.Id.IsValid |
Returns true if the entity prototype reference is valid. More... | |
Static Public Attributes | |
static EntityPrototypeRef | Invalid => new EntityPrototypeRef() |
Invalid entity prototype reference. More... | |
const int | SIZE = 16 |
Represents a generalized reference to an entity prototype - either EntityPrototype asset or an entity from Map.
|
inline |
Returns a string that represents the current EntityPrototypeRef in the format of:
[EntityPrototypeRef Asset: {Asset}, InnerAssetId: {InnerAssetId}]
|
inlinestatic |
Creates a new entity prototype reference from an entity prototype asset.
prototype |
|
inlinestatic |
Creates a new entity prototype reference from an entity in a map asset.
asset | Map asset |
internalAssetId | Index of the entity prototype |
|
inlinestatic |
Creates a new entity prototype reference from an entity in a map asset.
asset | Map asset |
internalAssetId | Index of the entity prototype |
AssetRef Quantum.EntityPrototypeRef.Asset |
The asset reference of EntityPrototype or Map.
int Quantum.EntityPrototypeRef.InnerAssetId |
If the entity prototype reference comes from a map asset, this is the index of the entity in the map.
|
static |
Invalid entity prototype reference.
readonly bool Quantum.EntityPrototypeRef.IsValid => Asset.Id.IsValid |
Returns true if the entity prototype reference is valid.