Resources

In the Curvy Generator, resources are GameObjects or prefabs that Modules read from or write to. Resources are split into two categories by ownership:

Unmanaged resources are created by the user, outside the generator hierarchy. Modules reference them as input. Examples:

The generator reads them but never creates, destroys, or modifies them.

Managed resources are created and owned by the generator. They are child GameObjects of the CurvyGenerator in the hierarchy. There are two resource types:

These are input GameObjects of the generator's modules. For example, the spline used by Input Spline Path when the user clicks on the “+” button in that module.

These are output GameObjects of the generator's modules. For example, mesh GameObjects produced by Create Mesh modules. They are created on demand. The generator uses a Pool Manager component (auto-added alongside CurvyGenerator) to recycle managed resources. This avoids unnecessary memory allocations. Any changes made by the user to these GameObjects may be overridden by the generator the next time it updates. Key behaviors:

  • Created on demand - modules create them on first refresh and reuse them on subsequent refreshes.
  • Pooled - the generator keeps a pool of mesh and GameObject resources. When output is cleared or the graph changes, resources go back to the pool instead of being destroyed, reducing allocation overhead.
  • Cleared on graph changes - if a module is not configured (missing or broken input), its managed resources are deleted.
  • Saved with templates - when you save a template, managed resources are included in the template prefab. Loading the template recreates them in the target graph.

To manually clear output managed resources, use the Clear Output button in the graph toolbar.