Class CGGameObjectResourceLoader
- Namespace
- FluffyUnderware.Curvy.Generator
GameObject resource loader class
public class CGGameObjectResourceLoader : ICGResourceLoader
- Inheritance
-
CGGameObjectResourceLoader
- 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
cgModuleCGModuleThe CGModule requesting the resource.
contextstringA 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
cgModuleCGModuleThe CGModule that owns the resource.
objComponentThe Component to destroy.
contextstringA context string that provides additional information for resource destruction. The meaning depends on the loader implementation.
killboolIf
true, the resource is permanently destroyed (e.g., viaObject.Destroy). Iffalse, the resource is returned to a pool for later reuse, when pooling is supported by the loader.
InitializeOnLoad()
protected static void InitializeOnLoad()