-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
74 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Assets/UnitySpineImporter/Scripts/Editor/UnityInternalMethods.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
| ||
using UnityEditor.Animations; | ||
using UnityEngine; | ||
using System.Reflection; | ||
using UnityEditor; | ||
|
||
public class UnityInternalMethods { | ||
public static AnimatorController GetEffectiveAnimatorController(Animator animator){ | ||
return (AnimatorController) (typeof(AnimatorController).GetMethod("GetEffectiveAnimatorController" | ||
, BindingFlags.Static | BindingFlags.NonPublic).Invoke(null, new object[]{ animator})); | ||
} | ||
|
||
public static void GetTextureSize(TextureImporter textureImporter, out int width, out int height){ | ||
object[] args = new object[2] { 0, 0 }; | ||
MethodInfo mi = typeof(TextureImporter).GetMethod("GetWidthAndHeight", BindingFlags.NonPublic | BindingFlags.Instance); | ||
mi.Invoke(textureImporter, args); | ||
width = (int)args[0]; | ||
height = (int)args[1]; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Assets/UnitySpineImporter/Scripts/Editor/UnityInternalMethods.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
m_EditorVersion: 5.1.1p3 | ||
m_StandardAssetsVersion: 0 |