Table of Contents

Class CGDataReference

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

module CGModule
slotName string

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

generator CurvyGenerator
moduleName string
slotName string

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

bool

IsEmpty

Gets whether this reference is empty (no slot name set)

public bool IsEmpty { get; }

Property Value

bool

Module

Gets the referenced module

public CGModule Module { get; }

Property Value

CGModule

Slot

Gets the referenced output slot

public CGModuleOutputSlot Slot { get; }

Property Value

CGModuleOutputSlot

SlotName

Gets the referenced slot name

public string SlotName { get; }

Property Value

string

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