Class ResourceExecutableLibrary
Provides Ceres.Resource loading and instantiation helpers for Flow graphs.
[CeresGroup("Resource")]
public class ResourceExecutableLibrary : ExecutableFunctionLibrary
- Inheritance
-
ResourceExecutableLibrary
- Inherited Members
Constructors
ResourceExecutableLibrary()
public ResourceExecutableLibrary()
Methods
CollectExecutableFunctions()
Collect all static executable functions in this library
protected override void CollectExecutableFunctions()
Flow_InstantiateAsync(string, Transform)
Instantiates a resource by address under the specified parent and waits synchronously for completion.
[ExecutableFunction]
[CeresLabel("Instantiate Synchronous")]
public static GameObject Flow_InstantiateAsync(string address, Transform parent)
Parameters
addressstringThe resource address to instantiate.
parentTransformThe parent transform for the created object.
Returns
- GameObject
The instantiated GameObject.
Flow_InstantiateAsync(string, Transform, EventDelegate<GameObject>)
Instantiates a resource by address under the specified parent asynchronously.
[ExecutableFunction]
[CeresLabel("Instantiate Async")]
public static void Flow_InstantiateAsync(string address, Transform parent, EventDelegate<GameObject> onComplete)
Parameters
addressstringThe resource address to instantiate.
parentTransformThe parent transform for the created object.
onCompleteEventDelegate<GameObject>Callback invoked with the instantiated GameObject.
Flow_LoadAssetAsync(string, EventDelegate<Object>)
Loads an asset by address asynchronously and invokes a callback when it completes.
[ExecutableFunction]
[CeresLabel("Load Asset Async")]
public static void Flow_LoadAssetAsync(string address, EventDelegate<Object> onComplete)
Parameters
addressstringThe resource address to load.
onCompleteEventDelegate<Object>Callback invoked with the loaded object.
Flow_LoadAssetSynchronous(string)
Loads an asset by address and waits synchronously for completion.
[ExecutableFunction]
[CeresLabel("Load Asset Synchronous")]
public static Object Flow_LoadAssetSynchronous(string address)
Parameters
addressstringThe resource address to load.
Returns
- Object
The loaded Unity object.