A collection of camera controller and input wrapper scripts
FollowCamerais a component which will move camera which set toCamerasetting to follow target which set toTargetsetting.FollowCameraControlsis a component which extending fromFollowCamerato manage rotating and zooming.
It has InputManager which is wrapper for mobile's on-screen joysticks to make it able to write the same input codes for mobile games and PC (or Mac or Linux).
You will have to change input codes:
UnityEngine.Input.GetButton(name)toInputManager.GetButton(name)UnityEngine.Input.GetButtonDown(name)toInputManager.GetButtonDown(name)UnityEngine.Input.GetButtonUp(name)toInputManager.GetButtonUp(name)UnityEngine.Input.GetAxisRaw(name)toInputManager.GetAxis(name, true)UnityEngine.Input.GetAxis(name)toInputManager.GetAxis(name, false)
You can set input settings in InputSettingManager by add the component to empty game object, you should add it in init scene, then set input settings as you wish.
I think it's a lot more convenient to set input settings in InputSettingManager component, if you don't want to use it, you still can use Unity's input manager.
Read on-screen input -> Read input setting from InputSettingManager -> Read input setting from Unity's input manager.
To test mobile's on-screen joysticks while running in editor, you have to set InputManager -> useMobileInputOnNonMobile to TRUE
This project is also has Rewired integration, if you have it and also want to use it, you have to add USE_REWIRED to scripting define symbols setting.