public void Deserialize(ZOSimDocumentRoot documentRoot, JObject json) { // Assert.Equals(json["type"].Value<string>() == Type); _json = json; Name = json.ValueOrDefault("name", Name); // TODO: build Hinge Joint if it doesn't exist? MinSteeringLockDegrees = json.ValueOrDefault <float>("min_limit_degrees", MinSteeringLockDegrees); MaxSteeringLockDegrees = json.ValueOrDefault <float>("max_limit_degrees", MaxSteeringLockDegrees); if (_pidController == null) { _pidController = new ZOPIDController(); } _pidController.Deserialize(documentRoot, json["pid_controller"].Value <JObject>()); }