【m】插件上传
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#if URS_USE_HDRP_EDITOR
|
||||
using UnityEngine; //Debug
|
||||
using UnityEditor; //AssetPostProcessor
|
||||
using UnityEngine.Rendering; //GraphicsSettings
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
using UnityEngine.Rendering.HighDefinition; //HDRenderPipelineAsset
|
||||
#else
|
||||
using UnityEngine.Experimental.Rendering.HDPipeline; //HDRenderPipelineAsset
|
||||
#endif
|
||||
|
||||
namespace Unity.RenderStreaming.Editor
|
||||
{
|
||||
public class HDRPPostProcessor
|
||||
{
|
||||
[InitializeOnLoadMethod]
|
||||
static void OnLoad()
|
||||
{
|
||||
if (null != GraphicsSettings.renderPipelineAsset)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var allAssetPaths = AssetDatabase.GetAllAssetPaths();
|
||||
|
||||
foreach (var curAssetPath in allAssetPaths)
|
||||
{
|
||||
if (curAssetPath.EndsWith("HDRenderPipelineAsset.asset"))
|
||||
{
|
||||
HDRenderPipelineAsset pipelineAsset =
|
||||
AssetDatabase.LoadAssetAtPath<HDRenderPipelineAsset>(curAssetPath);
|
||||
GraphicsSettings.renderPipelineAsset = pipelineAsset;
|
||||
PlayerSettings.colorSpace = ColorSpace.Linear;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20855faa7e3098a45a7419d63413e91e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
#if URS_USE_URS_EDITOR
|
||||
using UnityEngine; //Debug
|
||||
using UnityEditor; //AssetPostProcessor
|
||||
using UnityEngine.Rendering; //GraphicsSettings
|
||||
|
||||
namespace Unity.RenderStreaming.Editor
|
||||
{
|
||||
public class URPInitialSetupPostProcessor
|
||||
{
|
||||
[InitializeOnLoadMethod]
|
||||
static void OnLoad()
|
||||
{
|
||||
if (null != GraphicsSettings.renderPipelineAsset)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var allAssetPaths = AssetDatabase.GetAllAssetPaths();
|
||||
|
||||
foreach (var curAssetPath in allAssetPaths)
|
||||
{
|
||||
if (curAssetPath.EndsWith("UniversalRenderPipelineAsset.asset"))
|
||||
{
|
||||
UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset pipelineAsset =
|
||||
AssetDatabase.LoadAssetAtPath<UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset>(
|
||||
curAssetPath);
|
||||
GraphicsSettings.renderPipelineAsset = pipelineAsset;
|
||||
PlayerSettings.colorSpace = ColorSpace.Linear;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56ab6df1ed5509b4387782f82a09958f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user