Class FlexalonCloner
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.
Inheritance
object
    UnityEngine.Object
    UnityEngine.Component
    UnityEngine.Behaviour
    UnityEngine.MonoBehaviour
    FlexalonCloner
  Syntax
[AddComponentMenu("Flexalon/Flexalon Cloner")]
[HelpURL("https://www.flexalon.com/docs/cloner")]
public class FlexalonCloner : MonoBehaviourProperties
CloneType
In which order should prefabs be cloned.
Declaration
public FlexalonCloner.CloneTypes CloneType { get; set; }Property Value
| Type | Description | 
|---|---|
| FlexalonCloner.CloneTypes | 
Count
How many clones should be generated.
Declaration
public uint Count { get; set; }Property Value
| Type | Description | 
|---|---|
| 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.
Declaration
public GameObject DataSource { get; set; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.GameObject | 
Objects
Prefabs which should be cloned as children.
Declaration
public List<GameObject> Objects { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.List<T><UnityEngine.GameObject> | 
RandomSeed
Seed used for the Random clone type, to ensure results remain consistent.
Declaration
public int RandomSeed { get; set; }Property Value
| Type | Description | 
|---|---|
| int | 
Methods
MarkDirty()
Forces the cloner to regenerate its clones.
Declaration
public void MarkDirty()