mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Merge branch '3.7' into 3.8-beta
This commit is contained in:
commit
c99eba701a
@ -862,6 +862,7 @@ void _spAnimationState_animationsChanged (spAnimationState* self) {
|
|||||||
|
|
||||||
for (;i < n; i++) {
|
for (;i < n; i++) {
|
||||||
entry = self->tracks[i];
|
entry = self->tracks[i];
|
||||||
|
if (!entry) continue;
|
||||||
while (entry->mixingFrom != 0)
|
while (entry->mixingFrom != 0)
|
||||||
entry = entry->mixingFrom;
|
entry = entry->mixingFrom;
|
||||||
do {
|
do {
|
||||||
|
|||||||
@ -1785,6 +1785,9 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
internal static void EnableTK2D () {
|
internal static void EnableTK2D () {
|
||||||
bool added = false;
|
bool added = false;
|
||||||
|
|
||||||
|
DisableSpineAsmdefFiles();
|
||||||
|
|
||||||
foreach (BuildTargetGroup group in System.Enum.GetValues(typeof(BuildTargetGroup))) {
|
foreach (BuildTargetGroup group in System.Enum.GetValues(typeof(BuildTargetGroup))) {
|
||||||
if (IsInvalidGroup(group))
|
if (IsInvalidGroup(group))
|
||||||
continue;
|
continue;
|
||||||
@ -1811,6 +1814,9 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
internal static void DisableTK2D () {
|
internal static void DisableTK2D () {
|
||||||
bool removed = false;
|
bool removed = false;
|
||||||
|
|
||||||
|
EnableSpineAsmdefFiles();
|
||||||
|
|
||||||
foreach (BuildTargetGroup group in System.Enum.GetValues(typeof(BuildTargetGroup))) {
|
foreach (BuildTargetGroup group in System.Enum.GetValues(typeof(BuildTargetGroup))) {
|
||||||
if (IsInvalidGroup(group))
|
if (IsInvalidGroup(group))
|
||||||
continue;
|
continue;
|
||||||
@ -1833,6 +1839,31 @@ namespace Spine.Unity.Editor {
|
|||||||
Debug.LogWarning("Already Removed Scripting Define Symbol " + SPINE_TK2D_DEFINE);
|
Debug.LogWarning("Already Removed Scripting Define Symbol " + SPINE_TK2D_DEFINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void DisableSpineAsmdefFiles() {
|
||||||
|
SetAsmdefFileActive("spine-unity-editor", false);
|
||||||
|
SetAsmdefFileActive("spine-unity", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void EnableSpineAsmdefFiles() {
|
||||||
|
SetAsmdefFileActive("spine-unity-editor", true);
|
||||||
|
SetAsmdefFileActive("spine-unity", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void SetAsmdefFileActive(string filename, bool setActive) {
|
||||||
|
|
||||||
|
string typeSearchString = setActive ? " t:textasset" : " t:asmdef";
|
||||||
|
string[] guids = AssetDatabase.FindAssets(filename + typeSearchString);
|
||||||
|
foreach (string guid in guids) {
|
||||||
|
string currentPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||||
|
string targetPath = System.IO.Path.ChangeExtension(currentPath, setActive ? "asmdef" : "txt");
|
||||||
|
if (System.IO.File.Exists(currentPath)) {
|
||||||
|
System.IO.File.Copy(currentPath, targetPath);
|
||||||
|
System.IO.File.Copy(currentPath + ".meta", targetPath + ".meta");
|
||||||
|
}
|
||||||
|
AssetDatabase.DeleteAsset(currentPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user