I got curious about this subject and researched it around, it seems like the best practice is to provide a mouse pointer resolution scaler in your game's configuration menu. Basically you should create a JS script file in your Assets\Plugins folder so that you can detect that the player is effectively using Safari web browser. And then you do apply that resolution scaler to the mouse input.
The JavaScript - Name it: BrowserUtils.jslib
mergeInto(LibraryManager.library, {
IsSafariBrowser: function () {
var ua = navigator.userAgent.toLowerCase();
// Chrome and Edge also have "safari" in their UA string, so we must exclude them.
if (ua.indexOf('safari') != -1) {
if (ua.indexOf('chrome') > -1) {
return false; // It's Chrome or Edge
} else {
return true; // It's likely genuine Safari
}
}
return false;
}
});```
The Helper - This will interface with the Java Script plugin described above (so that you can have cleaner code in your actual game code later) Name it as the name of the class: WebGLInputManager.cs
```cs
using UnityEngine;
using System.Runtime.InteropServices;
public class WebGLInputManager : MonoBehaviour
{
// Common multiplier found by the community for Safari vs Chrome
// You may need to tune this between 2.0f and 4.0f depending on the specific feel.
private const float SAFARI_SENSITIVITY_MULTIPLIER = 2.5f;
public static float MouseSensitivityMultiplier { get; private set; } = 1.0f;
[DllImport("__Internal")]
private static extern bool IsSafariBrowser();
void Awake()
{
// Default to 1.0 (no change)
MouseSensitivityMultiplier = 1.0f;
#if UNITY_WEBGL && !UNITY_EDITOR
if (IsSafariBrowser())
{
Debug.Log("Safari detected: Applying sensitivity correction.");
MouseSensitivityMultiplier = SAFARI_SENSITIVITY_MULTIPLIER;
}
#endif
}
}





Fenrisus#6137 was banned