[unity] Minor cleanup.

This commit is contained in:
pharan 2018-09-25 18:00:56 +08:00
parent 7da81ecad1
commit 9ea81260eb
3 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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);
}