Table of Contents

Class CGResourceHandler

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

module CGModule
resName string
context string

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

module CGModule
resName string
obj Component
context string
kill bool

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

resourceName string

The name of the type of resources the loader handles

loader ICGResourceLoader

The loader