mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[unity] Fixed another occurrence of compile errors in Unity 2017.3 when enabling TK2D define due to asmdef files. See #1280.
This commit is contained in:
parent
15be5feeea
commit
8ca94c2da4
@ -1852,12 +1852,12 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
internal static void SetAsmdefFileActive(string filename, bool setActive) {
|
internal static void SetAsmdefFileActive(string filename, bool setActive) {
|
||||||
|
|
||||||
string typeSearchString = setActive ? " t:textasset" : " t:asmdef";
|
string typeSearchString = setActive ? " t:TextAsset" : " t:AssemblyDefinitionAsset";
|
||||||
string[] guids = AssetDatabase.FindAssets(filename + typeSearchString);
|
string[] guids = AssetDatabase.FindAssets(filename + typeSearchString);
|
||||||
foreach (string guid in guids) {
|
foreach (string guid in guids) {
|
||||||
string currentPath = AssetDatabase.GUIDToAssetPath(guid);
|
string currentPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||||
string targetPath = System.IO.Path.ChangeExtension(currentPath, setActive ? "asmdef" : "txt");
|
string targetPath = System.IO.Path.ChangeExtension(currentPath, setActive ? "asmdef" : "txt");
|
||||||
if (System.IO.File.Exists(currentPath)) {
|
if (System.IO.File.Exists(currentPath) && !System.IO.File.Exists(targetPath)) {
|
||||||
System.IO.File.Copy(currentPath, targetPath);
|
System.IO.File.Copy(currentPath, targetPath);
|
||||||
System.IO.File.Copy(currentPath + ".meta", targetPath + ".meta");
|
System.IO.File.Copy(currentPath + ".meta", targetPath + ".meta");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user