Infohazard.Core.Addressables 1.0.0
Infohazard Core Addressables Integration
Loading...
Searching...
No Matches
Infohazard.Core.Addressables.AddressableSpawnRef< T > Class Template Reference

AddressableSpawnRef for spawning a GameObject directly. More...

Public Member Functions

 AddressableSpawnRef ()
 Default constructor (needed for Unity serialization). More...
 
 AddressableSpawnRef (AssetReferenceGameObject assetReference)
 Construct with a given asset reference. More...
 
 AddressableSpawnRef ()
 Default constructor (needed for Unity serialization). More...
 
 AddressableSpawnRef (AssetReferenceGameObject assetReference)
 Construct with a given asset reference. More...
 
- Public Member Functions inherited from Infohazard.Core.Addressables.AddressableSpawnRefBase< GameObject >
 AddressableSpawnRefBase ()
 Default constructor (needed for Unity serialization). More...
 
 AddressableSpawnRefBase (AssetReferenceGameObject assetReference)
 Construct with a given asset reference. More...
 
override string ToString ()
 
virtual UniTask RetainAndWaitAsync ()
 Add a user to the AddressableSpawnRef, creating the AddressablePoolHandler if necessary. If not already loaded, the prefab will be loaded asynchronously. More...
 
virtual async UniTask WaitUntilLoadedAsync ()
 If the prefab is currently loading, wait until it is done asynchronously. More...
 
virtual void RetainAndWait ()
 Add a user to the AddressableSpawnRef, creating the AddressablePoolHandler if necessary. If not already loaded, the prefab will be loaded and block. More...
 
virtual void WaitUntilLoaded ()
 If the prefab is currently loading, wait until it is done synchronously. More...
 
virtual void Retain ()
 Add a user to the AddressableSpawnRef, creating the AddressablePoolHandler if necessary. More...
 
virtual void Release ()
 Remove a user from the AddressableSpawnRef, in turn releasing the IPoolHandler. More...
 
Spawn (in SpawnParams spawnParams=default)
 Spawn an instance of Prefab. The AddressableSpawnRef MUST be retained. More...
 
- Public Member Functions inherited from Infohazard.Core.Addressables.AddressableSpawnRefBase< T >
 AddressableSpawnRefBase ()
 Default constructor (needed for Unity serialization). More...
 
 AddressableSpawnRefBase (AssetReferenceGameObject assetReference)
 Construct with a given asset reference. More...
 
override string ToString ()
 
virtual UniTask RetainAndWaitAsync ()
 Add a user to the AddressableSpawnRef, creating the AddressablePoolHandler if necessary. If not already loaded, the prefab will be loaded asynchronously. More...
 
virtual async UniTask WaitUntilLoadedAsync ()
 If the prefab is currently loading, wait until it is done asynchronously. More...
 
virtual void RetainAndWait ()
 Add a user to the AddressableSpawnRef, creating the AddressablePoolHandler if necessary. If not already loaded, the prefab will be loaded and block. More...
 
virtual void WaitUntilLoaded ()
 If the prefab is currently loading, wait until it is done synchronously. More...
 
virtual void Retain ()
 Add a user to the AddressableSpawnRef, creating the AddressablePoolHandler if necessary. More...
 
virtual void Release ()
 Remove a user from the AddressableSpawnRef, in turn releasing the IPoolHandler. More...
 
Spawn (in SpawnParams spawnParams=default)
 Spawn an instance of Prefab. The AddressableSpawnRef MUST be retained. More...
 

Additional Inherited Members

- Protected Attributes inherited from Infohazard.Core.Addressables.AddressableSpawnRefBase< GameObject >
AssetReferenceGameObject _assetReference
 (Serialized) Reference to the addressable prefab to spawn. More...
 
- Protected Attributes inherited from Infohazard.Core.Addressables.AddressableSpawnRefBase< T >
AssetReferenceGameObject _assetReference
 (Serialized) Reference to the addressable prefab to spawn. More...
 
- Properties inherited from Infohazard.Core.Addressables.AddressableSpawnRefBase< GameObject >
AssetReferenceGameObject AssetReference [get]
 Reference to the addressable prefab to spawn. More...
 
bool IsValid [get]
 Whether there is a valid asset reference. More...
 
bool Loaded [get]
 Whether the referenced asset has been loaded successfully and the AddressableSpawnRef is retained at least once. More...
 
int RetainCount [get, private set]
 Number of users of the AddressableSpawnRef More...
 
Prefab [get]
 Prefab to be spawned, if it is loaded. More...
 
- Properties inherited from Infohazard.Core.Addressables.AddressableSpawnRefBase< T >
AssetReferenceGameObject AssetReference [get]
 Reference to the addressable prefab to spawn. More...
 
bool IsValid [get]
 Whether there is a valid asset reference. More...
 
bool Loaded [get]
 Whether the referenced asset has been loaded successfully and the AddressableSpawnRef is retained at least once. More...
 
int RetainCount [get, private set]
 Number of users of the AddressableSpawnRef More...
 
Prefab [get]
 Prefab to be spawned, if it is loaded. More...
 

Detailed Description

AddressableSpawnRef for spawning a GameObject directly.

AddressableSpawnRef for spawning a GameObject and returning one of its components.

Type Constraints
T :Component 

Constructor & Destructor Documentation

◆ AddressableSpawnRef() [1/4]

Default constructor (needed for Unity serialization).

◆ AddressableSpawnRef() [2/4]

Infohazard.Core.Addressables.AddressableSpawnRef< T >.AddressableSpawnRef ( AssetReferenceGameObject  assetReference)

Construct with a given asset reference.

Parameters
assetReferenceThe prefab to be spawned.

◆ AddressableSpawnRef() [3/4]

Default constructor (needed for Unity serialization).

◆ AddressableSpawnRef() [4/4]

Infohazard.Core.Addressables.AddressableSpawnRef< T >.AddressableSpawnRef ( AssetReferenceGameObject  assetReference)

Construct with a given asset reference.

Parameters
assetReferenceThe prefab to be spawned.

The documentation for this class was generated from the following file: