📱Streaming & Multiplatform
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:
Geforce is our default provider, we have integrations with other streaming providers, if you want to use these please get in touch
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
, orOther
)
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 for more details
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 OSNOTE: Only works for GFN streaming
GetDeviceType
: Returns eitherMobile
,Tablet
, orUnset
(for PC etc.)
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
.
These are handled in-game using different events, e.g. InputTouch
vs LeftMouseButton
To detect if you are using touch controls, you can use your player controller (cast to at least J_PlayerController
):
UsingTouch
: Returns whether we are using touch input or notOnUsingTouchChanged
: 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.
Console?
Currently console work is unsupported
Last updated