Struct EntityPrefabReference
Weak reference to entity prefab. Entity prefabs are GameObjects that have been fully converted into entity data during the import/build process.
Namespace: Unity.Entities.Serialization
Assembly: Unity.Entities.dll
Syntax
[Serializable]
public struct EntityPrefabReference
Constructors
Name | Description |
---|---|
Entity |
Construct an EntityPrefabReference from a GUID. |
Entity |
Construct an EntityPrefabReference from a GameObject. |
Properties
Name | Description |
---|---|
Asset |
Returns the prefab GUID. |
Is |
Returns true if the reference has a valid id. In the editor, additional checks for the correct GenerationType and the existence of the referenced asset are performed. |
Methods
Name | Description |
---|---|
Equals(object) | Overrides the default Object.Equals method. |
Equals(Entity |
Checks if this reference holds the same asset GUID as the other reference. |
Get |
Overrides the default Object.GetHashCode method. |