Example #1
0
        private void LoadAllData()
        {
            // Debug View Data
            _debugViewDatas = new List <DebugViewData>();
            var assets = AssetDatabase.FindAssets("t:DebugViewData");

            if (assets != null)
            {
                foreach (var assetGUID in assets)
                {
                    var assetPath = AssetDatabase.GUIDToAssetPath(assetGUID);
                    var data      = AssetDatabase.LoadAssetAtPath <DebugViewData>(assetPath);
                    _debugViewDatas.Add(data);
                }
            }

            // Debug View Render Pipeline
            var renderPipelines = AssetDatabase.FindAssets("t:DebugViewRenderPipelineAsset");

            if (renderPipelines != null && renderPipelines.Length > 0)
            {
                var assetPath = AssetDatabase.GUIDToAssetPath(renderPipelines[0]);
                _debugViewRenderPipelineAsset = AssetDatabase.LoadAssetAtPath <DebugViewRenderPipelineAsset>(assetPath);
            }

            // URP Render Pipeline
            SaveURPAssetIfPossible();

            RefreshCorrectlyLoaded();
        }
Example #2
0
        private void LoadAllData()
        {
            const string DebugViewFolder = "DebugViews";

            var debugViewDatas = Resources.LoadAll <DebugViewData>(DebugViewFolder);

            if (debugViewDatas != null && debugViewDatas.Length > 0)
            {
                _debugViewDatas = new List <DebugViewData>(debugViewDatas);
            }

            var renderPipelines = Resources.LoadAll <DebugViewRenderPipelineAsset>(DebugViewFolder);

            if (renderPipelines != null && renderPipelines.Length > 0)
            {
                _debugViewRenderPipelineAsset = renderPipelines[0];
            }

            RefreshCorrectlyLoaded();
        }