Interface to create custom implementation of the entity view pool that can be assigned to the QuantumEntityViewUpdater.Pool.
More...
|
GameObject | Create (GameObject prefab, bool activate=true, bool createIfEmpty=true) |
| Create a pooled game object. More...
|
|
GameObject | Create (GameObject prefab, Transform parent, bool activate=true, bool createIfEmpty=true) |
| Create a pooled game object. More...
|
|
T | Create< T > (T prefab, bool activate=true, bool createIfEmpty=true) |
| Create a pooled game object and return the component of chose type. More...
|
|
T | Create< T > (T prefab, Transform parent, bool activate=true, bool createIfEmpty=true) |
| Create a pooled game object and return the component of chose type. More...
|
|
void | Destroy (Component component, bool deactivate=true) |
| Destroy or return the pooled game object that the component is attached to. More...
|
|
void | Destroy (GameObject instance, bool deactivate=true) |
| Destroy or return the pooled game object. More...
|
|
void | Destroy (GameObject instance, float delay) |
| Destroy or return the pooled game object after a delay. More...
|
|
void | Prepare (GameObject prefab, int desiredCount) |
| Create prefab instances and fill the pool. More...
|
|
Interface to create custom implementation of the entity view pool that can be assigned to the QuantumEntityViewUpdater.Pool.
◆ Create< T >() [1/2]
Create a pooled game object and return the component of chose type.
- Template Parameters
-
- Parameters
-
prefab | Prefab to instantiate |
activate | Call SetActive() on the game object |
createIfEmpty | Create a new entity if there is no suitable one found in the pool |
- Returns
- Component on the created prefab instance, can be null
Implemented in Quantum.QuantumEntityViewPool.
◆ Create() [1/2]
GameObject Quantum.IQuantumEntityViewPool.Create |
( |
GameObject |
prefab, |
|
|
bool |
activate = true , |
|
|
bool |
createIfEmpty = true |
|
) |
| |
Create a pooled game object.
- Parameters
-
prefab | Prefab to instantiate |
activate | Call SetActive() on the game object |
createIfEmpty | Create a new entity if there is no suitable one found in the pool |
- Returns
- An instance of the prefab
Implemented in Quantum.QuantumEntityViewPool.
◆ Create< T >() [2/2]
Create a pooled game object and return the component of chose type.
- Template Parameters
-
- Parameters
-
prefab | Prefab to instantiate |
parent | Calls SetParent(parent) on the new game object transform when set |
activate | Call SetActive() on the game object |
createIfEmpty | Create a new entity if there is no suitable one found in the pool |
- Returns
- Component on the created prefab instance, can be null
Implemented in Quantum.QuantumEntityViewPool.
◆ Create() [2/2]
GameObject Quantum.IQuantumEntityViewPool.Create |
( |
GameObject |
prefab, |
|
|
Transform |
parent, |
|
|
bool |
activate = true , |
|
|
bool |
createIfEmpty = true |
|
) |
| |
Create a pooled game object.
- Parameters
-
prefab | Prefab to instantiate |
parent | Calls SetParent(parent) on the new game object transform when set |
activate | Call SetActive() on the game object |
createIfEmpty | Create a new entity if there is no suitable one found in the pool |
- Returns
- An instance of the prefab
Implemented in Quantum.QuantumEntityViewPool.
◆ Destroy() [1/3]
void Quantum.IQuantumEntityViewPool.Destroy |
( |
Component |
component, |
|
|
bool |
deactivate = true |
|
) |
| |
Destroy or return the pooled game object that the component is attached to.
- Parameters
-
component | Component that belongs to the pooled game object. |
deactivate | Call SetActive(false) on the pooled game object before returning it to the pool |
Implemented in Quantum.QuantumEntityViewPool.
◆ Destroy() [2/3]
void Quantum.IQuantumEntityViewPool.Destroy |
( |
GameObject |
instance, |
|
|
bool |
deactivate = true |
|
) |
| |
Destroy or return the pooled game object.
- Parameters
-
instance | Poole game object |
deactivate | Call SetActive(false) on the pooled game object before returning it to the pool |
Implemented in Quantum.QuantumEntityViewPool.
◆ Destroy() [3/3]
void Quantum.IQuantumEntityViewPool.Destroy |
( |
GameObject |
instance, |
|
|
float |
delay |
|
) |
| |
Destroy or return the pooled game object after a delay.
- Parameters
-
instance | Poole game object |
delay | Delay in seconds to complete returning it to the pool |
Implemented in Quantum.QuantumEntityViewPool.
◆ Prepare()
void Quantum.IQuantumEntityViewPool.Prepare |
( |
GameObject |
prefab, |
|
|
int |
desiredCount |
|
) |
| |
Create prefab instances and fill the pool.
- Parameters
-
prefab | Prefab to created pooled instances |
desiredCount | The number of instances to create and add to the pool |
Implemented in Quantum.QuantumEntityViewPool.
◆ PooledCount
int Quantum.IQuantumEntityViewPool.PooledCount |
|
get |
Returns how many items are inside the pool in total.
◆ BorrowedCount
int Quantum.IQuantumEntityViewPool.BorrowedCount |
|
get |
Returns how many pooled items are currently in use.