Table of Contents

Method GetOrCreateClone

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

GetOrCreateClone<TObject>(TObject, out bool)

Returns the clone this spawn already made for source, or instantiates one now and registers it as owned. Keyed by the source asset, so receivers that share an authored asset in the template end up sharing one clone, preserving the template's reference topology instead of exploding it into one clone per receiver. created tells the caller whether this call created the clone, so one time setup (naming, for example) runs exactly once and never rewrites what an earlier receiver did.

public TObject GetOrCreateClone<TObject>(TObject source, out bool created) where TObject : Object

Parameters

source TObject
created bool

Returns

TObject

Type Parameters

TObject