mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 05:42:08 +02:00
better extension check
This commit is contained in:
parent
87026a85f1
commit
b0ae323d52
2 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ class AvatarExporter : MonoBehaviour {
|
|||
assetPath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]);
|
||||
assetName = Path.GetFileNameWithoutExtension(assetPath);
|
||||
ModelImporter modelImporter = ModelImporter.GetAtPath(assetPath) as ModelImporter;
|
||||
if (assetPath.ToLower().LastIndexOf(".fbx") == -1 || modelImporter == null) {
|
||||
if (Path.GetExtension(assetPath).ToLower() != ".fbx" || modelImporter == null) {
|
||||
EditorUtility.DisplayDialog("Error", "Please select an .fbx model asset to export.", "Ok");
|
||||
return;
|
||||
}
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue