VisualClone Method |
Namespace: Demo3D.Visuals
public Visual Clone()
[Auto] void OnReset(Visual sender) { // This example will create a copy of a child named "Prototype" // every time the Reset button is pressed: var proto = sender.FindChild("Prototype"); if (proto == null) return; var copy = proto.Clone(); // Make it a child copy.Reparent( sender ); // Make sure it's in a different location // to the original copy.LocationZ = proto.LocationZ + 1; print("New copy of prototype :" + copy.Name); }