Dragonfly Cloud is now available on the AWS Marketplace - Learn More

Error: unity webgl not supported on mobile

What's Causing This Error

The 'unity webgl not supported on mobile' error typically occurs because the Unity WebGL build is not officially supported on mobile browsers. Unity Technologies states that its WebGL platform is primarily aimed at desktop browsers due to reasons related to performance and compatibility. Mobile browsers often lack the computational power to effectively render the heavy graphics of a Unity WebGL project, which can lead to subpar performance, crashes, or simply being unsupported. Furthermore, some mobile browsers might not fully support all WebGL features, creating additional compatibility issues.

Solution - Here's How To Resolve It

While it's not recommended to run Unity WebGL projects on mobile browsers due to the stated limitations, if you still want to attempt this, there are a few strategies you could consider:

  1. Optimization: Make your game as lightweight as possible. Reduce the number of polygons in meshes, optimize textures, limit the number of active objects and scripts, and use low-poly models when possible.

  2. Check Compatibility: Make sure to test your project across different devices and browsers to ensure it works as expected, and gracefully handle any unsupported features.

  3. Fallback Options: If your application detects a mobile device, provide an alternative experience or notify the user that their device may not be fully supported. You can do this by implementing a warning message or redirecting users to a mobile version of your content (if available).

  4. Consider Using Unity's Project Tiny: Unity's Project Tiny is a new modular Unity runtime and Editor mode designed to build lightweight, fast, and small sized projects. It offers promising outcomes for developing for platforms with limited resources, such as mobile browsers.

In conclusion, while it's technically possible to run Unity WebGL on some mobile devices, it's generally not recommended due to performance and compatibility issues. For best results, consider alternative deployment options for mobile users.

Was this content helpful?

Switch & save up to 80% 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost