|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
|
|
|
|
return path; |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: The two following functions depend on HDRP, they should be made generic
|
|
|
|
// TODO: The following functions depend on HDRP, they should be made generic
|
|
|
|
public static string GetScriptableRenderPipelinePath() |
|
|
|
{ |
|
|
|
var hdrpPath = GetHDRenderPipelinePath(); |
|
|
|
var fullPath = Path.GetFullPath(hdrpPath + "../"); |
|
|
|
var relativePath = fullPath.Substring(fullPath.IndexOf("Assets")); |
|
|
|
return relativePath.Replace("\\", "/") + "/"; |
|
|
|
} |
|
|
|
|
|
|
|
public static string GetPostProcessingPath() |
|
|
|
{ |
|
|
|
var hdrpPath = GetHDRenderPipelinePath(); |
|
|
|
|
|
|
MaterialResetter resetter; |
|
|
|
if (k_MaterialResetters.TryGetValue(material.shader.name, out resetter)) |
|
|
|
{ |
|
|
|
RemoveMaterialKeywords(material); |
|
|
|
CoreEditorUtils.RemoveMaterialKeywords(material); |
|
|
|
} |
|
|
|
|
|
|
|
public static void RemoveMaterialKeywords(Material material) |
|
|
|
{ |
|
|
|
material.shaderKeywords = null; |
|
|
|
} |
|
|
|
} |
|
|
|
} |