Curvy  8.2.0
CurvyGenerator Class Reference
+ Inheritance diagram for CurvyGenerator:
+ Collaboration diagram for CurvyGenerator:

Detailed Description

Curvy Generator component

Public Attributes

List< CGModuleModules = new List<CGModule>()
 List of modules this Generator contains More...
 
Dictionary< int, CGModuleModulesByID = new Dictionary<int, CGModule>()
 Dictionary to get a module by it's ID More...
 

Properties

bool AutoRefresh [get, set]
 Gets or sets whether to automatically call Refresh if necessary More...
 
bool Destroying [get]
 Gets whether the Generator is about to get destroyed More...
 
bool IsInitialized [get]
 Gets whether the generator and all its dependencies are fully initialized More...
 
CurvyCGEvent OnRefresh [get, set]
 Event raised after refreshing the Generator More...
 
PoolManager PoolManager [get]
 Gets the PoolManager More...
 
int RefreshDelay [get, set]
 Gets or sets the minimum delay between two consecutive calls to Refresh while playing, expressed in milliseconds More...
 
int RefreshDelayEditor [get, set]
 Gets or sets the minimum delay between two consecutive calls to Refresh in the editor More...
 
bool ShowDebug [get, set]
 Gets or sets whether to show debug outputs More...
 

Public Member Functions

CGModule AddModule (System.Type type)
 Adds a Module More...
 
AddModule< T > ()
 Adds a Module More...
 
void ArrangeModules ()
 Auto-Arrange modules' graph canvas position In other words, this alligns the graph with the top left corner of the canvas. This does not modify the modules position relatively to each other More...
 
void Clear ()
 Clears the whole generator More...
 
bool DeleteAllOutputManagedResources (out bool associatedPrefabWasModified)
 Delete all the managed resources acting as an output. One example of this are the generated meshes by the FluffyUnderware.Curvy.Generator.Modules.CreateMesh module More...
 
void DeleteModule (CGModule module)
 Deletes a module (same as PCGModule.Delete()) More...
 
List< T > FindModules< T > ()
 Find modules of a given type More...
 
List< T > FindModules< T > (bool includeOnRequestProcessing)
 Find modules of a given type More...
 
CGModule GetModule (int moduleID)
 Gets a module by ID, either including or excluding IOnRequestProcessing modules More...
 
CGModule GetModule (int moduleID, bool includeOnRequestProcessing)
 Gets a module by ID, either including or excluding IOnRequestProcessing modules More...
 
CGModule GetModule (string moduleName)
 Gets a module by name, either including or excluding IOnRequestProcessing modules More...
 
CGModule GetModule (string moduleName, bool includeOnRequestProcessing)
 Gets a module by name, either including or excluding IOnRequestProcessing modules More...
 
GetModule< T > (int moduleID)
 Gets a module by ID, either including or excluding IOnRequestProcessing modules (Generic version) More...
 
GetModule< T > (int moduleID, bool includeOnRequestProcessing)
 Gets a module by ID, either including or excluding IOnRequestProcessing modules (Generic version) More...
 
GetModule< T > (string moduleName)
 Gets a module by name, either including or excluding IOnRequestProcessing modules (Generic version) More...
 
GetModule< T > (string moduleName, bool includeOnRequestProcessing)
 Gets a module by name, either including or excluding IOnRequestProcessing modules (Generic version) More...
 
CGModuleOutputSlot GetModuleOutputSlot (int moduleId, string slotName)
 Gets a module's output slot by module ID and slotName More...
 
CGModuleOutputSlot GetModuleOutputSlot (string moduleName, string slotName)
 Gets a module's output slot by module name and slotName More...
 
List< CGModuleGetModules ()
 Gets a list of modules, either including or excluding IOnRequestProcessing modules More...
 
List< CGModuleGetModules (bool includeOnRequestProcessing)
 Gets a list of modules, either including or excluding IOnRequestProcessing modules More...
 
void Initialize (bool force=false)
 Initializes the Generator More...
 
void Refresh (bool forceUpdate=false)
 Refreshes the Generator More...
 
void ReorderModules ()
 Changes the modules' positions to make the graph easier to read. More...
 
void TryAutoRefresh ()
 Will try to auto refresh the generator. Basically this calls Refresh if AutoRefresh is set and the refresh delays are respected More...
 

Static Public Member Functions

static CurvyGenerator Create ()
 Creates a new GameObject with a CurvyGenerator attached More...
 

Protected Member Functions

CurvyCGEventArgs OnRefreshEvent (CurvyCGEventArgs e)
 

Member Function Documentation

CGModule AddModule ( System.Type  type)

Adds a Module

Parameters
typetype of the Module
Returns
the new Module
T AddModule< T > ( )

Adds a Module

Template Parameters
Ttype of the Module
Returns
the new Module
Type Constraints
T :CGModule 
void ArrangeModules ( )

Auto-Arrange modules' graph canvas position In other words, this alligns the graph with the top left corner of the canvas. This does not modify the modules position relatively to each other

void Clear ( )

Clears the whole generator

static CurvyGenerator Create ( )
static

Creates a new GameObject with a CurvyGenerator attached

Returns
the Generator component
bool DeleteAllOutputManagedResources ( out bool  associatedPrefabWasModified)

Delete all the managed resources acting as an output. One example of this are the generated meshes by the FluffyUnderware.Curvy.Generator.Modules.CreateMesh module

Parameters
associatedPrefabWasModifiedIs true if an associated prefab was modified to deleted the output resources from it too

Due to how the prefab system works, this method has to delete output from associated prefab assets too

Returns
True if there were deleted resources
void DeleteModule ( CGModule  module)

Deletes a module (same as PCGModule.Delete())

Parameters
modulea module
List<T> FindModules< T > ( )

Find modules of a given type

Template Parameters
Tthe module type
Returns
a list of zero or more modules
Type Constraints
T :CGModule 
T :FindModules<T> 
T :false 
List<T> FindModules< T > ( bool  includeOnRequestProcessing)

Find modules of a given type

Template Parameters
Tthe module type
Parameters
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
Returns
a list of zero or more modules
Type Constraints
T :CGModule 
CGModule GetModule ( int  moduleID)

Gets a module by ID, either including or excluding IOnRequestProcessing modules

Parameters
moduleIDthe ID of the module in question
CGModule GetModule ( int  moduleID,
bool  includeOnRequestProcessing 
)

Gets a module by ID, either including or excluding IOnRequestProcessing modules

Parameters
moduleIDthe ID of the module in question
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
CGModule GetModule ( string  moduleName)

Gets a module by name, either including or excluding IOnRequestProcessing modules

Parameters
moduleName
CGModule GetModule ( string  moduleName,
bool  includeOnRequestProcessing 
)

Gets a module by name, either including or excluding IOnRequestProcessing modules

Parameters
moduleName
includeOnRequestProcessing
T GetModule< T > ( int  moduleID)

Gets a module by ID, either including or excluding IOnRequestProcessing modules (Generic version)

Template Parameters
Ttype of the module
Parameters
moduleIDthe ID of the module in question
Type Constraints
T :CGModule 
T :GetModule<T> 
T :moduleID 
T :false 
T GetModule< T > ( int  moduleID,
bool  includeOnRequestProcessing 
)

Gets a module by ID, either including or excluding IOnRequestProcessing modules (Generic version)

Template Parameters
Ttype of the module
Parameters
moduleIDthe ID of the module in question
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
Type Constraints
T :CGModule 
T GetModule< T > ( string  moduleName)

Gets a module by name, either including or excluding IOnRequestProcessing modules (Generic version)

Template Parameters
Ttype of the module
Parameters
moduleNamethe ID of the module in question
Type Constraints
T :CGModule 
T :GetModule 
T :T 
T :moduleName 
T :false 
T GetModule< T > ( string  moduleName,
bool  includeOnRequestProcessing 
)

Gets a module by name, either including or excluding IOnRequestProcessing modules (Generic version)

Template Parameters
Ttype of the module
Parameters
moduleNamethe ID of the module in question
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
Type Constraints
T :CGModule 
CGModuleOutputSlot GetModuleOutputSlot ( int  moduleId,
string  slotName 
)

Gets a module's output slot by module ID and slotName

Parameters
moduleIdId of the module
slotNameName of the slot
CGModuleOutputSlot GetModuleOutputSlot ( string  moduleName,
string  slotName 
)

Gets a module's output slot by module name and slotName

Parameters
moduleNameName of the module
slotNameName of the slot
List<CGModule> GetModules ( )

Gets a list of modules, either including or excluding IOnRequestProcessing modules

Returns
a list of zero or more modules
List<CGModule> GetModules ( bool  includeOnRequestProcessing)

Gets a list of modules, either including or excluding IOnRequestProcessing modules

Parameters
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
void Initialize ( bool  force = false)

Initializes the Generator

Parameters
forcetrue to force reinitialization
CurvyCGEventArgs OnRefreshEvent ( CurvyCGEventArgs  e)
protected
void Refresh ( bool  forceUpdate = false)

Refreshes the Generator

Parameters
forceUpdatetrue to force a refresh of all modules
void ReorderModules ( )

Changes the modules' positions to make the graph easier to read.

void TryAutoRefresh ( )

Will try to auto refresh the generator. Basically this calls Refresh if AutoRefresh is set and the refresh delays are respected

Member Data Documentation

List<CGModule> Modules = new List<CGModule>()

List of modules this Generator contains

Dictionary<int, CGModule> ModulesByID = new Dictionary<int, CGModule>()

Dictionary to get a module by it's ID

Property Documentation

bool AutoRefresh
getset

Gets or sets whether to automatically call Refresh if necessary

bool Destroying
get

Gets whether the Generator is about to get destroyed

bool IsInitialized
get

Gets whether the generator and all its dependencies are fully initialized

CurvyCGEvent OnRefresh
getset

Event raised after refreshing the Generator

PoolManager PoolManager
get

Gets the PoolManager

int RefreshDelay
getset

Gets or sets the minimum delay between two consecutive calls to Refresh while playing, expressed in milliseconds

int RefreshDelayEditor
getset

Gets or sets the minimum delay between two consecutive calls to Refresh in the editor

bool ShowDebug
getset

Gets or sets whether to show debug outputs


The documentation for this class was generated from the following file: