#if UNITY_EDITOR using UnityEditor; using UnityEditor.ProjectWindowCallback; #endif using System; namespace UnityEngine.Rendering.Universal { [Serializable] public class XRSystemData : ScriptableObject { #if UNITY_EDITOR [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812")] internal class CreateXRSystemDataAsset : EndNameEditAction { public override void Action(int instanceId, string pathName, string resourceFile) { var instance = CreateInstance(); AssetDatabase.CreateAsset(instance, pathName); ResourceReloader.ReloadAllNullIn(instance, UniversalRenderPipelineAsset.packagePath); Selection.activeObject = instance; } } [MenuItem("Assets/Create/Rendering/URP XR System Data", priority = CoreUtils.Sections.section5 + CoreUtils.Priorities.assetsCreateRenderingMenuPriority)] static void CreateXRSystemData() { ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, CreateInstance(), "CustomXRSystemData.asset", null, null); } #endif [Serializable, ReloadGroup] public sealed class ShaderResources { [Reload("Shaders/XR/XROcclusionMesh.shader")] public Shader xrOcclusionMeshPS; [Reload("Shaders/XR/XRMirrorView.shader")] public Shader xrMirrorViewPS; } public ShaderResources shaders; } }