mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 21:08:28 +00:00
fix checking if asset exists
This commit is contained in:
parent
ef4fb54ce6
commit
e9d69848cb
1 changed files with 4 additions and 6 deletions
|
@ -213,13 +213,11 @@ namespace SanAndreasUnity.Editor
|
|||
if (AssetDatabase.Contains(asset))
|
||||
return false;
|
||||
|
||||
if (!AssetDatabase.IsMainAssetAtPathLoaded(path))
|
||||
{
|
||||
AssetDatabase.CreateAsset(asset, path);
|
||||
return true;
|
||||
}
|
||||
if (File.Exists(Path.Combine(Application.dataPath + "/../", path)))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
AssetDatabase.CreateAsset(asset, path);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue