# Streaming & Multiplatform

| On Keyboard & Mouse | Using Touch Controls                                                |
| ------------------- | ------------------------------------------------------------------- |
|                     | <img src="/files/xSxuZYXdfZIndbqjkZb1" alt="" data-size="original"> |

MSquared supports releases on multiple platforms, with others additionally supported through the power of streaming. If your project needs to handle these different platforms separately, we have some helpers and recommended flows to enable this.

## Streaming Clients

Some helpers if you want to differentiate based on using streaming or not:

{% hint style="warning" %}
Geforce is our default provider, we have integrations with other streaming providers, if you want to use these please get in touch
{% endhint %}

* `IsAStreamingClient`: Returns true if the client is running via a game streaming provider (e.g. Geforce Now or Ubitus)
* `GetStreamingClient`: Returns the streaming client type (`Geforcenow`, `Ubitus`, or `Other`)

{% hint style="info" %}
NOTE: if you want your event to to run on mobile via GFN, there are some extra considerations you will need to bear in mind. See [GFN on Mobile](/creation/unreal-development/features-and-tutorials/streaming-and-multiplatform/gfn-on-mobile.md) for more details
{% endhint %}

## Multi-platform Clients

In the `M2_GameInstance`, we have a number of device and control type related helpers:

* `IsRunningOnMobile`: Checks if we are running on a mobile OS
  * (If you are using a streaming client, this will be the OS of the device, rather than the machine that is hosting)
* `IsRunningOnIPadOS`: Checks specifically if we are using an iPad OS
  * NOTE: Only works for GFN streaming
* `GetDeviceType`: Returns either `Mobile`, `Tablet`, or `Unset` (for PC etc.)

<figure><img src="/files/hWbKgR2V2NAKSFo7GAjb" alt=""><figcaption></figcaption></figure>

### Touch Controls

In a similar vein to "mobile", we have the concept of using touch controls. The two are not exactly the same, since some PCs can use touch controls, and you can easily simulate touch controls in-editor using `Editor Preferences -> Use Mouse for Touch`.

<figure><img src="/files/UWmJHOBgIFbowhSlvjRD" alt=""><figcaption></figcaption></figure>

These are handled in-game using different events, e.g. `InputTouch` vs `LeftMouseButton`

<figure><img src="/files/GDajgVBJyHIGJjgYXH5R" alt=""><figcaption></figcaption></figure>

To detect if you are using touch controls, you can use the following:

* `IsUsingMobileControls`: Returns true if we are currently on a mobile platform, or are using touch controls (e.g. if you are testing in-editor with `UseMouseForTouch`)
* `ListenToUsingTouchUpdates`: You can bind an event to this which gets triggered when the we switch to using mobile controls, e.g. when testing in-editor. This event is triggered when the first touch is detected (so we know we are using touch controls). This can be used to e.g. enable UI that only applies to touch controls.

<figure><img src="/files/guGdPK58Nv8r6TdC4vGn" alt=""><figcaption></figcaption></figure>

### Native Mobile

As well as

* Native iOS is available as of [Morpheus Platform Release v39.1](/creation/unreal-development/release-notes/v39_1.md), in an experimental state. For more details, see [Native iOS](/creation/running-events/player-entry/native-ios.md)
* Native Android is currently under investigation.

### Console?

Currently console work is unsupported


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.msquared.io/creation/unreal-development/features-and-tutorials/streaming-and-multiplatform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
