mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-22 10:34:54 -05:00
This commit is contained in:
@@ -57,6 +57,14 @@ namespace UniGLTF
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (!string.IsNullOrEmpty(UnityEditor.AssetDatabase.GetAssetPath(texture)))
|
||||
{
|
||||
m_exportTextures[index] = texture;
|
||||
return index;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ToDo: may already exists
|
||||
m_exportTextures[index] = TextureItem.CopyTexture(texture, readWrite, null);
|
||||
|
||||
|
||||
@@ -129,7 +129,15 @@ namespace UniGLTF
|
||||
Bytes = System.IO.File.ReadAllBytes(path.FullPath),
|
||||
Mime = "image/png",
|
||||
};
|
||||
}
|
||||
}
|
||||
if (path.Extension == ".jpg")
|
||||
{
|
||||
return new BytesWithMime
|
||||
{
|
||||
Bytes = System.IO.File.ReadAllBytes(path.FullPath),
|
||||
Mime = "image/jpeg",
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user