PrefabIdComponent Class
Component that stores the PrefabId identifying a GameObject's prefab origin. More...
Declaration
Public Constructors Index
| PrefabIdComponent (const PrefabIdComponent &)=delete | |
|
Copy construction is deleted (prefab identity is not cloneable). More... | |
| PrefabIdComponent (PrefabIdComponent &&)=default | |
|
Move constructor. More... | |
| PrefabIdComponent (const PrefabId prefabId) | |
|
Constructs a PrefabIdComponent with the given prefab identifier. More... | |
Public Destructor Index
| ~PrefabIdComponent ()=default | |
|
Destructor. More... | |
Public Operators Index
| PrefabIdComponent & | operator= (const PrefabIdComponent &)=delete |
|
Copy assignment is deleted (prefab identity is not cloneable). More... | |
| PrefabIdComponent & | operator= (PrefabIdComponent &&)=default |
|
Move assignment operator. More... | |
Public Member Functions Index
| PrefabId | prefabId () const noexcept |
|
Returns the stored prefab identifier. More... | |
Private Member Attributes Index
| PrefabId | prefabId_ |
|
The prefab identifier for this entity's template origin. More... | |
Description
Component that stores the PrefabId identifying a GameObject's prefab origin.
PrefabIdComponent is attached to pooled GameObjects to record which prefab template they were cloned from. The pool system uses this ID to associate entities with their originating pool configuration.
Copy construction and assignment are explicitly deleted because prefab identity is intrinsic to the original template - cloned instances receive their own PrefabIdComponent via move during pool initialization, not through the blueprint copy path.
- See Also
- See Also
- See Also
GameObjectFactory::withPrefabId
Definition at line 33 of file PrefabIdComponent.ixx.
Public Constructors
PrefabIdComponent()
| delete |
Copy construction is deleted (prefab identity is not cloneable).
Definition at line 48 of file PrefabIdComponent.ixx.
Reference PrefabIdComponent.
Referenced by operator=, operator=, PrefabIdComponent and PrefabIdComponent.
PrefabIdComponent()
| default |
PrefabIdComponent()
| inline explicit |
Constructs a PrefabIdComponent with the given prefab identifier.
- Parameters
-
prefabId The prefab identifier to store.
Definition at line 64 of file PrefabIdComponent.ixx.
Reference prefabId.
Public Destructor
~PrefabIdComponent()
| default |
Destructor.
Definition at line 45 of file PrefabIdComponent.ixx.
Public Operators
operator=()
| delete |
Copy assignment is deleted (prefab identity is not cloneable).
Definition at line 51 of file PrefabIdComponent.ixx.
Reference PrefabIdComponent.
operator=()
| default |
Move assignment operator.
Definition at line 57 of file PrefabIdComponent.ixx.
Reference PrefabIdComponent.
Public Member Functions
prefabId()
| inline nodiscard noexcept |
Returns the stored prefab identifier.
- Returns
The PrefabId identifying the prefab template.
Definition at line 71 of file PrefabIdComponent.ixx.
Referenced by PrefabIdComponent.
Private Member Attributes
prefabId_
|
The prefab identifier for this entity's template origin.
Definition at line 38 of file PrefabIdComponent.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.