Class CGDataReference
- Namespace
- FluffyUnderware.Curvy.Generator
Class referencing a particular module's output slot
[Serializable]
public class CGDataReference
- Inheritance
-
CGDataReference
Remarks
When using, be sure to add the CGDataReferenceSelectorAttribute to the field
Constructors
CGDataReference()
public CGDataReference()
CGDataReference(CGModule, string)
Creates a reference to a specific output slot on a module
public CGDataReference(CGModule module, string slotName)
Parameters
CGDataReference(CurvyGenerator, string, string)
Creates a reference by looking up a module by name in a generator
public CGDataReference(CurvyGenerator generator, string moduleName, string slotName)
Parameters
generatorCurvyGeneratormoduleNamestringslotNamestring
Properties
Data
Gets the output data from the referenced slot
public CGData[] Data { get; }
Property Value
- CGData[]
HasValue
Gets whether the referenced slot has data
public bool HasValue { get; }
Property Value
IsEmpty
Gets whether this reference is empty (no slot name set)
public bool IsEmpty { get; }
Property Value
Module
Gets the referenced module
public CGModule Module { get; }
Property Value
Slot
Gets the referenced output slot
public CGModuleOutputSlot Slot { get; }
Property Value
SlotName
Gets the referenced slot name
public string SlotName { get; }
Property Value
Methods
Clear()
Clears this reference
public void Clear()
GetAllData<T>()
Gets all data elements cast to the specified type
public T[] GetAllData<T>() where T : CGData
Returns
- T[]
Type Parameters
T
GetData<T>()
Gets the first data element cast to the specified type
public T GetData<T>() where T : CGData
Returns
- T
Type Parameters
T