Merge branch 'master' into feature/bone_morph

This commit is contained in:
ousttrue
2026-04-13 14:43:12 +09:00
committed by GitHub
4 changed files with 15 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
using UnityEngine.Rendering;
using UnityEngine.Rendering;
namespace UniGLTF
{
@@ -6,19 +6,19 @@ namespace UniGLTF
{
public static RenderPipelineTypes GetRenderPipelineType()
{
RenderPipeline currentPipeline = RenderPipelineManager.currentPipeline;
RenderPipelineAsset currentRenderPipelineAsset = GraphicsSettings.currentRenderPipeline;
if (currentPipeline == null)
if (currentRenderPipelineAsset == null)
{
return RenderPipelineTypes.BuiltinRenderPipeline;
}
if (currentPipeline.GetType().Name.Contains("HDRenderPipeline"))
if (currentRenderPipelineAsset.GetType().Name.Contains("HDRenderPipeline"))
{
return RenderPipelineTypes.HighDefinitionRenderPipeline;
}
if (currentPipeline.GetType().Name.Contains("UniversalRenderPipeline"))
if (currentRenderPipelineAsset.GetType().Name.Contains("UniversalRenderPipeline"))
{
return RenderPipelineTypes.UniversalRenderPipeline;
}
@@ -26,4 +26,4 @@ namespace UniGLTF
return RenderPipelineTypes.Unknown;
}
}
}
}

View File

@@ -255,9 +255,10 @@ namespace UniGLTF
}
}
static Dictionary<Transform, IReadOnlyDictionary<Transform, TransformState>> PoseMap = new();
static readonly Dictionary<Transform, IReadOnlyDictionary<Transform, TransformState>> PoseMap = new();
public static IReadOnlyDictionary<Transform, TransformState> SafeGetInitialPose(
Transform root, bool useCache = true)
Transform root, bool useCache = false)
{
if (useCache && PoseMap.TryGetValue(root, out var pose))
{
@@ -278,7 +279,10 @@ namespace UniGLTF
}
// add cache
PoseMap.Add(root, pose);
if (useCache)
{
PoseMap.Add(root, pose);
}
return pose;
}

View File

@@ -44,7 +44,7 @@ namespace UniVRM10
// use material.name, because material name may renamed in GltfParser.
matDesc = new MaterialDescriptor(
m.name,
Shader.Find(MToon10Meta.UnityShaderName),
Shader,
null,
Vrm10MToonTextureImporter.EnumerateAllTextures(data, m, mtoon).ToDictionary(tuple => tuple.key, tuple => tuple.Item2.Item2),
TryGetAllFloats(m, mtoon).ToDictionary(tuple => tuple.key, tuple => tuple.value),

View File

@@ -39,7 +39,7 @@ namespace UniVRM10
// use material.name, because material name may renamed in GltfParser.
matDesc = new MaterialDescriptor(
m.name,
Shader.Find(MToon10Meta.UnityUrpShaderName),
Shader,
null,
Vrm10MToonTextureImporter.EnumerateAllTextures(data, m, mtoon).ToDictionary(tuple => tuple.key, tuple => tuple.Item2.Item2),
BuiltInVrm10MToonMaterialImporter.TryGetAllFloats(m, mtoon).ToDictionary(tuple => tuple.key, tuple => tuple.value),