mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Some cleanup and docs.
This commit is contained in:
parent
16b9d63bf7
commit
0afe70ee9d
@ -574,8 +574,8 @@ namespace Spine.Unity.Editor {
|
|||||||
#else
|
#else
|
||||||
if (spriteCollection.objectReferenceValue == null)
|
if (spriteCollection.objectReferenceValue == null)
|
||||||
warnings.Add("SkeletonDataAsset requires tk2DSpriteCollectionData.");
|
warnings.Add("SkeletonDataAsset requires tk2DSpriteCollectionData.");
|
||||||
else
|
// else
|
||||||
warnings.Add("Your sprite collection may have missing images.");
|
// warnings.Add("Your sprite collection may have missing images.");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -341,6 +341,8 @@ namespace Spine.Unity.Modules.AttachmentTools {
|
|||||||
return Sprite.Create(ar.GetMainTexture(), ar.GetUnityRect(), new Vector2(0.5f, 0.5f), pixelsPerUnit);
|
return Sprite.Create(ar.GetMainTexture(), ar.GetUnityRect(), new Vector2(0.5f, 0.5f), pixelsPerUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Creates a new Texture2D object based on an AtlasRegion.
|
||||||
|
/// If applyImmediately is true, Texture2D.Apply is called immediately after the Texture2D is filled with data.</summary>
|
||||||
public static Texture2D ToTexture (this AtlasRegion ar, bool applyImmediately = true) {
|
public static Texture2D ToTexture (this AtlasRegion ar, bool applyImmediately = true) {
|
||||||
Texture2D sourceTexture = ar.GetMainTexture();
|
Texture2D sourceTexture = ar.GetMainTexture();
|
||||||
Rect r = ar.GetUnityRect(sourceTexture.height);
|
Rect r = ar.GetUnityRect(sourceTexture.height);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user