Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

81 行
2.8 KiB

using System;
using UnityEngine.Scripting.APIUpdating;
namespace UnityEngine.Rendering.LWRP
{
[Obsolete("LWRP -> Universal (UnityUpgradable) -> UnityEngine.Rendering.Universal.UniversalRenderPipelineEditorResources", true)]
public class LightweightRenderPipelineEditorResources
{
}
}
namespace UnityEngine.Rendering.Universal
{
[MovedFrom("UnityEngine.Rendering.LWRP")] public class UniversalRenderPipelineEditorResources : ScriptableObject
{
[Serializable, ReloadGroup]
public sealed class ShaderResources
{
[Reload("Shaders/Autodesk Interactive/Autodesk Interactive.shadergraph")]
public Shader autodeskInteractivePS;
[Reload("Shaders/Autodesk Interactive/Autodesk Interactive Transparent.shadergraph")]
public Shader autodeskInteractiveTransparentPS;
[Reload("Shaders/Autodesk Interactive/Autodesk Interactive Masked.shadergraph")]
public Shader autodeskInteractiveMaskedPS;
[Reload("Shaders/Terrain/TerrainDetailLit.shader")]
public Shader terrainDetailLitPS;
[Reload("Shaders/Terrain/WavingGrass.shader")]
public Shader terrainDetailGrassPS;
[Reload("Shaders/Terrain/WavingGrassBillboard.shader")]
public Shader terrainDetailGrassBillboardPS;
[Reload("Shaders/Nature/SpeedTree7.shader")]
public Shader defaultSpeedTree7PS;
[Reload("Shaders/Nature/SpeedTree8.shader")]
public Shader defaultSpeedTree8PS;
}
[Serializable, ReloadGroup]
public sealed class MaterialResources
{
[Reload("Runtime/Materials/Lit.mat")]
public Material lit;
[Reload("Runtime/Materials/ParticlesLit.mat")]
public Material particleLit;
[Reload("Runtime/Materials/TerrainLit.mat")]
public Material terrainLit;
}
public ShaderResources shaders;
public MaterialResources materials;
}
#if UNITY_EDITOR
[UnityEditor.CustomEditor(typeof(UniversalRenderPipelineEditorResources), true)]
class UniversalRenderPipelineEditorResourcesEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
// Add a "Reload All" button in inspector when we are in developer's mode
if (UnityEditor.EditorPrefs.GetBool("DeveloperMode") && GUILayout.Button("Reload All"))
{
var resources = target as UniversalRenderPipelineEditorResources;
resources.materials = null;
resources.shaders = null;
ResourceReloader.ReloadAllNullIn(target, UniversalRenderPipelineAsset.packagePath);
}
}
}
#endif
}