Class CGResourceHandler
- Namespace
- FluffyUnderware.Curvy.Generator
Manages resource creation and destruction for the Curvy Generator by delegating to registered ICGResourceLoader instances
public static class CGResourceHandler
- Inheritance
-
CGResourceHandler
Methods
CreateResource(CGModule, string, string)
Creates a resource of the given type using the registered loader
[NotNull]
public static Component CreateResource(CGModule module, string resName, string context)
Parameters
Returns
- Component
DestroyResource(CGModule, string, Component, string, bool)
Destroys a resource using the registered loader. If kill is true, the object is destroyed immediately; otherwise it is returned to a pool.
public static void DestroyResource(CGModule module, string resName, Component obj, string context, bool kill)
Parameters
RegisterResourceLoader(string, ICGResourceLoader)
Add a resource loader to the list of loaders this resource handler uses
public static void RegisterResourceLoader(string resourceName, ICGResourceLoader loader)
Parameters
resourceNamestringThe name of the type of resources the loader handles
loaderICGResourceLoaderThe loader