浏览代码

Merge pull request #1210 from Unity-Technologies/Display-warning-message-with-VR

Display warning message with VR when not supported in HD
/main
GitHub 7 年前
当前提交
b9541da7
共有 2 个文件被更改,包括 24 次插入3 次删除
  1. 18
      ScriptableRenderPipeline/Core/CoreRP/Utilities/CoreUtils.cs
  2. 9
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs

18
ScriptableRenderPipeline/Core/CoreRP/Utilities/CoreUtils.cs


return mesh;
}
public static void DisplayUnsupportedAPIMessage()
public static void DisplayUnsupportedMessage(string msg)
Debug.LogError("Platform " + SystemInfo.operatingSystem + " with device " + SystemInfo.graphicsDeviceType.ToString() + " is not supported, no rendering will occur");
Debug.LogError(msg);
sv.ShowNotification(new GUIContent("Platform " + SystemInfo.operatingSystem + " with device " + SystemInfo.graphicsDeviceType.ToString() + " is not supported, no rendering will occur"));
sv.ShowNotification(new GUIContent(msg));
public static void DisplayUnsupportedAPIMessage()
{
string msg = "Platform " + SystemInfo.operatingSystem + " with device " + SystemInfo.graphicsDeviceType.ToString() + " is not supported, no rendering will occur";
DisplayUnsupportedMessage(msg);
}
public static void DisplayUnsupportedXRMessage()
{
string msg = "AR/VR devices are not supported, no rendering will occur";
DisplayUnsupportedMessage(msg);
}
// Returns 'true' if "Animated Materials" are enabled for the view associated with the given camera.
public static bool AreAnimatedMaterialsEnabled(Camera camera)

9
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


using System.Linq;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.XR;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{

if (!IsSupportedPlatform())
{
CoreUtils.DisplayUnsupportedAPIMessage();
return false;
}
// VR is not supported currently in HD
if (XRSettings.isDeviceActive)
{
CoreUtils.DisplayUnsupportedXRMessage();
return false;
}

正在加载...
取消
保存