Create a copy of a visual and its children placed in the
top level scene.
Namespace: Demo3D.VisualsAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
SyntaxReturn Value
VisualA new visual with the same properties as the original visual.
Remarks
The parent of the new visual is the Scene, and so may need reparenting.
The world location of the new visual will be the same as the original,
so may not be visible until moved.
Example[Auto] void OnReset(Visual sender)
{
var proto = sender.FindChild("Prototype");
if (proto == null) return;
var copy = proto.Clone();
copy.Reparent( sender );
copy.LocationZ = proto.LocationZ + 1;
print("New copy of prototype :" + copy.Name);
}
See Also