public SplineAddress(SplineAddress copy) { if (copy != null && copy.depth != 0) { for (int i = 0; i < copy.elements.Length; i++) { AddElement(copy.elements[i]); } } }
public SplineAddress(SplineAddress copy) { if (copy == null) { return; } if (copy.depth == 0) { return; } for (int i = 0; i < copy.elements.Length; i++) { AddElement(copy.elements[i]); } }
/// <summary> /// Used by the custom editor. DO NO CALL THIS METHOD IN YOUR RUNTIME CODE /// </summary> public virtual void EditorAwake() { //Create a new instance of the address. Otherwise it would be a reference _address = new SplineAddress(_address); if (sampleUser) { if (!user.IsSubscribed(this)) { user.Subscribe(this); } } else { if (computer == null) { computer = GetComponent <SplineComputer>(); } else if (!computer.IsSubscribed(this)) { computer.Subscribe(this); } } RebuildImmediate(true); }