Table of Contents

Class CGShapeResourceLoader

Shape (2D spline) resource loader class

public class CGShapeResourceLoader : ICGResourceLoader
Inheritance
CGShapeResourceLoader
Implements

Methods

Create(CGModule, string)

Creates a new instance of the resource this loader is responsible for.

public Component Create(CGModule cgModule, string context)

Parameters

cgModule CGModule

The CGModule requesting the resource.

context string

A context string that provides additional information for resource creation. The meaning depends on the loader implementation.

Returns

Component

The newly created Component representing the resource. Must not be null.

Destroy(CGModule, Component, string, bool)

Destroys or recycles a previously created resource instance.

public void Destroy(CGModule cgModule, Component obj, string context, bool kill)

Parameters

cgModule CGModule

The CGModule that owns the resource.

obj Component

The Component to destroy.

context string

A context string that provides additional information for resource destruction. The meaning depends on the loader implementation.

kill bool

If true, the resource is permanently destroyed (e.g., via Object.Destroy). If false, the resource is returned to a pool for later reuse, when pooling is supported by the loader.

InitializeOnLoad()

protected static void InitializeOnLoad()