mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-12 21:45:06 -05:00
This commit is contained in:
parent
77e1e673f3
commit
8b4bae8141
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user