mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-22 18:45:06 -05:00
null check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user