mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[unity] Fixed activating and deactivating asmdef files for 2D Toolkit.
This commit is contained in:
parent
dabe0456bc
commit
f45e13b40d
@ -150,11 +150,11 @@ namespace Spine.Unity.Editor {
|
||||
internal static void SetAsmdefFileActive (string filename, bool setActive) {
|
||||
|
||||
string typeSearchString = setActive ? " t:TextAsset" : " t:AssemblyDefinitionAsset";
|
||||
string extensionBeforeChange = setActive ? "txt" : "asmdef";
|
||||
string extensionBeforeChange = setActive ? ".txt" : ".asmdef";
|
||||
string[] guids = AssetDatabase.FindAssets(filename + typeSearchString);
|
||||
foreach (string guid in guids) {
|
||||
string currentPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
if (!System.IO.Path.HasExtension(extensionBeforeChange)) // asmdef is also found as t:TextAsset, so check
|
||||
if (System.IO.Path.GetExtension(currentPath) != extensionBeforeChange) // asmdef is also found as t:TextAsset, so check
|
||||
continue;
|
||||
|
||||
string targetPath = System.IO.Path.ChangeExtension(currentPath, setActive ? "asmdef" : "txt");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user