private IEnumerator loadChildParameter() { int timer = 0; while (this.GetParameter <DMPartRequestParameter>() == null && timer < 200) { timer++; yield return(null); } if (timer >= 200) { this.Unregister(); this.Parent.RemoveParameter(this); DMUtils.Logging("Could not find child part request parameter; timed out; removing DMLongOrbit Parameter"); yield break; } try { partRequest = this.GetParameter <DMPartRequestParameter>(); } catch (Exception e) { this.Unregister(); this.Parent.RemoveParameter(this); DMUtils.Logging("Could not find child part request parameter; removing DMLongOrbit Parameter\n{0}", e); yield break; } if (partRequest == null) { this.Unregister(); this.Parent.RemoveParameter(this); DMUtils.Logging("Could not find child part request parameter; removing DMLongOrbit Parameter"); } }
public void setPartRequest(DMPartRequestParameter param) { partRequest = param; }