mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-09 04:19:42 -05:00
Merge pull request #1232 from ousttrue/fix/force_builtin_if_urp_not_installed
URP 未インストール時に、URPを選択できないように修正
This commit is contained in:
@@ -22,6 +22,18 @@ namespace UniGLTF
|
||||
[Header("Experimental")]
|
||||
public RenderPipelineTypes m_renderPipeline;
|
||||
|
||||
void OnValidate()
|
||||
{
|
||||
if (m_renderPipeline == UniGLTF.RenderPipelineTypes.UniversalRenderPipeline)
|
||||
{
|
||||
if (Shader.Find(UniGLTF.GltfPbrUrpMaterialImporter.ShaderName) == null)
|
||||
{
|
||||
Debug.LogWarning("URP is not installed. Force to BuiltinRenderPipeline");
|
||||
m_renderPipeline = UniGLTF.RenderPipelineTypes.BuiltinRenderPipeline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static IMaterialDescriptorGenerator GetMaterialGenerator(RenderPipelineTypes renderPipeline)
|
||||
{
|
||||
switch (renderPipeline)
|
||||
|
||||
@@ -21,5 +21,17 @@ namespace UniVRM10
|
||||
{
|
||||
VrmScriptedImporterImpl.Import(this, ctx, MigrateToVrm1, RenderPipeline);
|
||||
}
|
||||
|
||||
void OnValidate()
|
||||
{
|
||||
if (RenderPipeline == UniGLTF.RenderPipelineTypes.UniversalRenderPipeline)
|
||||
{
|
||||
if (Shader.Find(UniGLTF.GltfPbrUrpMaterialImporter.ShaderName) == null)
|
||||
{
|
||||
Debug.LogWarning("URP is not installed. Force to BuiltinRenderPipeline");
|
||||
RenderPipeline = UniGLTF.RenderPipelineTypes.BuiltinRenderPipeline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user