Closed afjk closed 6 months ago
I’ll fix isVisionOs function.
It happens only with Unity editor with VisionOs build settings now.
I fixed the function to check whether app is running on VisionOS
/// <summary>
/// Return true if current OS is VisionOS.
/// </summary>
/// <returns></returns>
public static bool IsVisionOS()
{
//When operatingSystem is "visionOS", return true
if (SystemInfo.operatingSystem.Contains("visionOS")) return true;
if (Application.platform == RuntimePlatform.VisionOS) return true;
#if UNITY_VISIONOS
return true;
#else
return false;
#endif
}
If you want to run only on the built VisionOS, you can specify the following.