private void OnJobPossess(InputAction.CallbackContext obj) { InitControllerType(obj); if (jobInRange.jobObject) { if (!jobInRange.possess) { Debug.Log("Possess job"); jobInRange.jobObject.Join(this); jobInRange.possess = true; machineState.ChangeState(new State_Work(machineState)); } else { jobInRange.jobObject.Exit(); jobInRange.possess = false; } } }