mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-07-06 20:24:08 -05:00
null check
This commit is contained in:
parent
7a801071bd
commit
d17f03c45d
|
|
@ -25,7 +25,7 @@ namespace UniGLTF
|
|||
{
|
||||
if (src == null) throw new ArgumentNullException(nameof(src));
|
||||
if (textureExporter == null) throw new ArgumentNullException(nameof(textureExporter));
|
||||
if (src.shader != Shader) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
|
||||
if (src.shader != Shader || Shader == null) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
|
||||
|
||||
dst = new glTFMaterial
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace UniGLTF
|
|||
{
|
||||
if (src == null) throw new ArgumentNullException(nameof(src));
|
||||
if (textureExporter == null) throw new ArgumentNullException(nameof(textureExporter));
|
||||
if (src.shader != Shader) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
|
||||
if (src.shader != Shader || Shader == null) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
|
||||
|
||||
dst = glTF_KHR_materials_unlit.CreateDefault();
|
||||
dst.name = src.name;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace UniGLTF
|
|||
{
|
||||
if (src == null) throw new ArgumentNullException(nameof(src));
|
||||
if (textureExporter == null) throw new ArgumentNullException(nameof(textureExporter));
|
||||
if (src.shader != Shader) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
|
||||
if (src.shader != Shader || Shader == null) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
|
||||
|
||||
dst = glTF_KHR_materials_unlit.CreateDefault();
|
||||
dst.name = src.name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user