MOST Controller

The best solution for mobile input controllers and supporting keyboard keys all possible variations of Custom buttons and joysticks with multiple input source support

Multiply_1 Template on real device
each controller activation area marked by it's color

Import MOST Controller

1- Create an empty object on your UI Canvas (will become the controller... Button, Joystick.....)

2- Select this object and tap Add Component

3- select Most_Control.cs

4- Modify the controller properties as they fit your vision and done... You have an input controller

  • The Controller system is only one .cs file contains all UI Input controllers (all types of Buttons + all types of joysticks + swipes)

  • You will find examples for most common controller variations and how to use it

  • The target UI Sprite object can be used in multiple controllers like use it to get inputs from screen (one controller) and keyboard (another controller), see examples below

Features

  • Using Most_Controller you can create all possible variations of Custom buttons and joysticks

  • Support Multiple input sources in one controller

the joystick controlled by touch and axis buttons from keyboard and button controlled by touch and X button (multi input source)
  • Support multitouch in the MOST efficient way

  • Support all mobile devices and all custom keyboard inputs

  • Support Swipes, Hover triggers, and custom zones

  • Complete debug system and all state output detections

  • Buffer Control (Time Buffer)

  • Charged controllers

  • Advanced UI Img/Color and a lot of "ready-to-use" effects

  • Live Output

You can see all controller output data directly from the inspector, or use get functions to get any data you're looking for. Check the API section

  • All output can be accessed using .cs calls or event systems

  • If Output refers to a value, the event system will send this value to the attached functions. for example, On Direction change event will send the new direction value

  • You will find all output values next to the Event brackets

All Events

Button (all types) Event System
Static joystick event system
Dynamic JoyStick Event system

Raw Output

What is Raw output? the distance in vector between the joystick knob center position and the max position that Knob can reach

Raw output used for? Or examples?

Note: when Knob is close to the center the throw aim sprite disappears (This is an optional setting on the controller "Min Activation Range")

API reference


// Output Functions
// main behavior enables or disables the controller
Most_Controller.EnableState(bool Enable);

// return the current direction of this controller in Vector2
Most_Controller.GetAxis(); return Vector2;

// return the current joystick Knob magnitude scale in float scaled (0,1)
Most_Controller.GetMagnitude(); return float;

// return the current joystick Knob position scale in float scaled (0,1)
Most_Controller.GetRawValue(); return Vector2;

// return the last detected swipe direction
Most_Controller.GetSwipeDirection(); return Vector2;

// Call this function to start a time buffer or charge (reset charge to 0)
// Depending on the selected buffer system
// bool exeeded must be true to start buffer
Most_Controller.StartBuffer(bool exeeded)

// Charge controller function
// The charger (from 0 to 100) value will be increased or decreased by "amount"
Most_Controller.ChargeBuffer(float amount)

//_______________________________________________________________//

// Check if this controller is receiving a touch input
Most_Controller.isTouched return bool

// Check if this controller is active or not
// same as GetMagnitude() value > 0;
Most_Controller.ExeedMinRange return bool

// Enable or disable or check if Touch input is enabled or not
Most_Controller.EnableTouch return or set bool

//Enable or disable or check if button input is enabled or not
Most_Controller.EnableButtons return or set bool

//Enable or disable or check if swipe control is enabled or not
Most_Controller.EnableSwipe return or set bool

//The distance from the center that has to be passed to enable OnExceedMinRange() 
// and return to enable OnReturnMinRange()
Most_Controller.KnobMinActiveRange return or set float

// The max Range of the Knob UI controller
Most_Controller.KnobMaxRange return or set float

// The touch scale to trigger a swipe
Most_Controller.SwipeSinstivity return or set float

// The enable time between start and end touch to enable swipe 
// Exceeding this time means this touch is not a swipe
Most_Controller.SwipeDisableDelta return or set float

// CoolDown time in seconds
Most_Controller.BufferTime return or set float

Last updated