Table of Contents

Class FlexalonCloner

Namespace
Flexalon
Assembly
Flexalon.dll

Sometimes, it's useful to generate child objects instead of defining them statically. The Flexalon Cloner can generate objects from a set of prefabs iteratively or randomly, and can optionally bind to a data source.

public class FlexalonCloner : MonoBehaviour
Inheritance
object
FlexalonCloner

Properties

CloneType

In which order should prefabs be cloned.

public FlexalonCloner.CloneTypes CloneType { get; set; }

Property Value

FlexalonCloner.CloneTypes

Count

How many clones should be generated.

public uint Count { get; set; }

Property Value

uint

DataSource

Can be an gameObject with a component that implements FlexalonDataSource. The number of objects cloned is set to the number of items in the Data property.

public GameObject DataSource { get; set; }

Property Value

GameObject

Objects

Prefabs which should be cloned as children.

public List<GameObject> Objects { get; set; }

Property Value

List<GameObject>

RandomSeed

Seed used for the Random clone type, to ensure results remain consistent.

public int RandomSeed { get; set; }

Property Value

int

Methods

MarkDirty()

Forces the cloner to regenerate its clones.

public void MarkDirty()