public override void Awake() { PlayerInput = new PlayerInput(); CommonInputActions = new PlayerInput.CommonActions(PlayerInput); MechaBattleInputActions = new PlayerInput.MechaBattleInputActions(PlayerInput); MechaBuildingInputActions = new PlayerInput.MechaBuildingInputActions(PlayerInput); Building_MouseLeft.GetStateCallbackFromContext(MechaBuildingInputActions.MouseLeftClick); Building_MouseRight.GetStateCallbackFromContext(MechaBuildingInputActions.MouseRightClick); Building_MouseMiddle.GetStateCallbackFromContext(MechaBuildingInputActions.MouseMiddleClick); MechaBuildingInputActions.Move.performed += context => Building_Move = context.ReadValue <Vector2>(); MechaBuildingInputActions.Move.canceled += context => Building_Move = Vector2.zero; Building_RotateItem.GetStateCallbackFromContext(MechaBuildingInputActions.RotateItem); Building_ToggleBackpack.GetStateCallbackFromContext(MechaBuildingInputActions.ToggleBackpack); Building_ToggleWireLines.GetStateCallbackFromContext(MechaBuildingInputActions.ToggleWireLines); Battle_MouseLeft.GetStateCallbackFromContext(MechaBattleInputActions.MouseLeftClick); Battle_MouseRight.GetStateCallbackFromContext(MechaBattleInputActions.MouseRightClick); Battle_MouseMiddle.GetStateCallbackFromContext(MechaBattleInputActions.MouseMiddleClick); MechaBattleInputActions.Move.performed += context => Battle_Move = context.ReadValue <Vector2>(); MechaBattleInputActions.Move.canceled += context => Battle_Move = Vector2.zero; Battle_Skill_0.GetStateCallbackFromContext(MechaBattleInputActions.Skill_0); Battle_Skill_1.GetStateCallbackFromContext(MechaBattleInputActions.Skill_1); Battle_Skill_2.GetStateCallbackFromContext(MechaBattleInputActions.Skill_2); Battle_Skill_3.GetStateCallbackFromContext(MechaBattleInputActions.Skill_3); Battle_ToggleBattleTip.GetStateCallbackFromContext(MechaBattleInputActions.ToggleBattleTip); Common_MouseLeft.GetStateCallbackFromContext(CommonInputActions.MouseLeftClick); Common_MouseRight.GetStateCallbackFromContext(CommonInputActions.MouseRightClick); Common_MouseMiddle.GetStateCallbackFromContext(CommonInputActions.MouseMiddleClick); Common_Confirm.GetStateCallbackFromContext(CommonInputActions.Confirm); Common_Debug.GetStateCallbackFromContext(CommonInputActions.Debug); Common_Exit.GetStateCallbackFromContext(CommonInputActions.Exit); Common_Tab.GetStateCallbackFromContext(CommonInputActions.Tab); Common_RestartGame.GetStateCallbackFromContext(CommonInputActions.RestartGame); PlayerInput.Enable(); CommonInputActions.Enable(); MechaBattleInputActions.Enable(); MechaBuildingInputActions.Disable(); }