void OnEnable() { if (serializedObject == null) { return; } steeringRig = serializedObject.targetObject as SteeringRig; ignoreList = serializedObject.FindProperty("IgnoreList"); avoidanceSensitivity = serializedObject.FindProperty("AvoidanceSensitivity"); maxAvoidanceLength = serializedObject.FindProperty("MaxAvoidanceLength"); yAxis = serializedObject.FindProperty("YAxis"); rotateTowardsTarget = serializedObject.FindProperty("RotateTowardsTarget"); rb = serializedObject.FindProperty("RB"); turnForce = serializedObject.FindProperty("TurnForce"); moveForce = serializedObject.FindProperty("MoveForce"); strafeForce = serializedObject.FindProperty("StrafeForce"); turnSpeed = serializedObject.FindProperty("TurnSpeed"); moveSpeed = serializedObject.FindProperty("MoveSpeed"); strafeSpeed = serializedObject.FindProperty("StrafeSpeed"); stoppingDistance = serializedObject.FindProperty("StoppingDistance"); destinationTransform = serializedObject.FindProperty("DestinationTransform"); faceTowardsTransform = serializedObject.FindProperty("FaceTowardsTransform"); }