Unity Plugin For Joiplay -
if (Application.platform == RuntimePlatform.Android && Input.GetKeyDown(KeyCode.Escape)) // Simulate Escape key for Unity UI or game menus if (JoiPlayDetector.IsRunningOnJoiPlay()) // Send Escape key event var escEvent = new Event keyCode = KeyCode.Escape, type = EventType.KeyDown ; EventSystem.current?.SetSelectedGameObject(null); else // Native Android back behavior Application.Quit();
Provide the .joiplay package and clearly state the requirements (Mono build, no video player, touch-as-mouse). Do not promise perfect performance — JoiPlay’s Unity support is unofficial and varies by device/Android version.
JoiPlay stores saves in its own folder ( /sdcard/Android/data/com.joiplay.joiplay/files/ ). Redirect Application.persistentDataPath .
void Awake()
void Start()
string joiSavePath = Path.Combine( Application.externalStorageDirectory, "Android/data/com.joiplay.joiplay/files/MyGameSaves" ); if (!Directory.Exists(joiSavePath)) Directory.CreateDirectory(joiSavePath); // Override persistentDataPath (read-only property — use reflection OR change your save logic) // Simpler: replace every Application.persistentDataPath with custom getter. SaveManager.CustomSavePath = joiSavePath;
using UnityEngine; public static class JoiPlayDetector Unity Plugin For Joiplay
void Update()
// JoiPlay sets specific environment variables string joiPlayVar = System.Environment.GetEnvironmentVariable("JOIPLAY_RUNTIME"); if (!string.IsNullOrEmpty(joiPlayVar)) return true;
using System.IO; using UnityEngine; public class JoiPlaySaveRedirect : MonoBehaviour if (Application
using UnityEngine; using UnityEngine.EventSystems; public class JoiPlayInput : MonoBehaviour
Wrap all file I/O in a class that checks JoiPlayDetector.IsRunningOnJoiPlay() and uses the alternate path. 3.4 Android Back Button as Escape void Update()
void SimulateMouseClick(Vector2 screenPos, int button) Redirect Application