Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Input Manager

Input Manager

The Input Manager component manages sending and receiving inputs in a multiplayer game.

When you’re creating a new map using the RTS Engine menu editor, this component is attached to an object called “InputManager”. In a single player game, this component will be destroyed on start.

The Input Manager is also responsible for creating unit, building and resource instances in a multiplayer game, therefore all unit, building and resource prefab objects must be stored in a path that ends with …/Resources/Prefabs/ so that they can be recognized by the Input Manager.

  1. Snap Distance: If enabled, when a player sends a command that moves a unit, the original unit position is sent as part of the input. If the distance between the sent original unit position and the current unit position on other clients is greater than this value, then the unit position will be reset to the one sent as part of the input. This allows to avoid de-synchronization issues.

How can we help?