public static Target RemoveTarget(Target target) { targets.Remove(target); target.AutoPing = false; target.Dispose(); target.File.Delete(); TargetRemoved?.Invoke(null, new TargetEventArgs(target)); return(target); }
public void RemoveTarget(GameObject target) { if (target) { if (mTargets.ContainsKey(target.GetInstanceID())) { mTargets.Remove(target.GetInstanceID()); OnTargetRemoved.Invoke(target); } } }
public void RemoveTarget(Transform target, bool addCommand = true) { if (target != null) { if (!targetRoots.ContainsKey(target)) { return; } if (addCommand) { UndoRedoManager.Insert(new RemoveTargetCommand(this, target)); } RemoveTargetHighlightedRenderers(target); RemoveTargetRoot(target); SetPivotPoint(); TargetRemoved?.Invoke(target); } }