// replace invalid parameter with cloned instance. void RenewParameter(AnyParameter param) { int index = _parameters.IndexOf(param); _parameters.RemoveAt(index); var newParam = param.CloneToParent(this); Parameters.Insert(index, newParam); }
public void DeleteParameter(AnyParameter param) { var index = _parameters.IndexOf(param); if (index < 0) { Debug.LogError("DeleteParameter(): param<" + param.Id + "> not found in AnyParameterList."); return; } _parameters.Remove(param); GameObject.DestroyImmediate(param); }