mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +08:00
[unity] Minor cleanup.
This commit is contained in:
parent
7da81ecad1
commit
9ea81260eb
@ -84,7 +84,6 @@ namespace Spine.Unity.Editor {
|
||||
public static Texture2D skeletonDataAssetIcon;
|
||||
public static Texture2D info;
|
||||
public static Texture2D unity;
|
||||
// public static Texture2D controllerIcon;
|
||||
|
||||
static Texture2D LoadIcon (string filename) {
|
||||
return (Texture2D)AssetDatabase.LoadMainAssetAtPath(SpineEditorUtilities.editorGUIPath + "/" + filename);
|
||||
@ -131,7 +130,6 @@ namespace Spine.Unity.Editor {
|
||||
|
||||
info = EditorGUIUtility.FindTexture("console.infoicon.sml");
|
||||
unity = EditorGUIUtility.FindTexture("SceneAsset Icon");
|
||||
// controllerIcon = EditorGUIUtility.FindTexture("AnimatorController Icon");
|
||||
}
|
||||
|
||||
public static Texture2D GetAttachmentIcon (Attachment attachment) {
|
||||
@ -381,6 +379,8 @@ namespace Spine.Unity.Editor {
|
||||
|
||||
foreach (var sr in activeSkeletonRenderers) {
|
||||
sr.Initialize(true);
|
||||
//Debug.Log(sr.name);
|
||||
//Debug.Log(sr.valid);
|
||||
}
|
||||
|
||||
foreach (var sg in activeSkeletonGraphics) {
|
||||
|
||||
@ -145,6 +145,7 @@ namespace Spine.Unity {
|
||||
if (boundingBoxAttachment != null) {
|
||||
if (!colliderTable.ContainsKey(boundingBoxAttachment)) {
|
||||
var bbCollider = SkeletonUtility.AddBoundingBoxAsComponent(boundingBoxAttachment, slot, gameObject, isTrigger);
|
||||
|
||||
bbCollider.enabled = false;
|
||||
bbCollider.hideFlags = HideFlags.NotEditable;
|
||||
bbCollider.isTrigger = IsTrigger;
|
||||
|
||||
@ -614,7 +614,7 @@ namespace Spine {
|
||||
animation.Apply(skeleton, 0, time, loop, null, 1f, MixBlend.Setup, MixDirection.In);
|
||||
}
|
||||
|
||||
/// <summary>Pose a skeleton according to a given time in an animation.</summary>
|
||||
/// <summary>Pose a skeleton according to a given time in an animation. This is the simplified version of Animation.Apply(skeleton).</summary>
|
||||
public static void PoseSkeleton (this Animation animation, Skeleton skeleton, float time, bool loop = false) {
|
||||
animation.Apply(skeleton, 0, time, loop, null, 1f, MixBlend.Setup, MixDirection.In);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user