diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureItem.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureItem.cs
index cc03b6cb5..e96402d3c 100644
--- a/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureItem.cs
+++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/TextureItem.cs
@@ -87,7 +87,7 @@ namespace UniGLTF
public bool IsAsset
{
- private set;
+ set;
get;
}
@@ -115,27 +115,12 @@ namespace UniGLTF
m_textureIndex = index;
m_textureLoader = textureLoader;
- if(m_textureLoader == null)
+ if (m_textureLoader == null)
{
throw new Exception("ITextureLoader is null.");
}
}
-#if UNITY_EDITOR
- ///
- /// Texture from asset
- ///
- ///
- ///
- ///
- public TextureItem(int index, UnityPath assetPath, string textureName)
- {
- m_textureIndex = index;
- IsAsset = true;
- m_textureLoader = new AssetTextureLoader(assetPath, textureName);
- }
-#endif
-
#region Process
ITextureLoader m_textureLoader;
diff --git a/Assets/UniGLTF/Runtime/UniGLTF/MaterialFacotry/MaterialFactory.cs b/Assets/UniGLTF/Runtime/UniGLTF/MaterialFacotry/MaterialFactory.cs
index 6a2d46291..659f620e4 100644
--- a/Assets/UniGLTF/Runtime/UniGLTF/MaterialFacotry/MaterialFactory.cs
+++ b/Assets/UniGLTF/Runtime/UniGLTF/MaterialFacotry/MaterialFactory.cs
@@ -121,7 +121,10 @@ namespace UniGLTF
///
var assetPath = imageBaseDir.Child(image.uri);
var textureName = !string.IsNullOrEmpty(image.name) ? image.name : Path.GetFileNameWithoutExtension(image.uri);
- item = new TextureItem(i, assetPath, textureName);
+ item = new TextureItem(i, new AssetTextureLoader(assetPath, textureName))
+ {
+ IsAsset = true
+ };
}
else
#endif