mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +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
|
||||
if (spriteCollection.objectReferenceValue == null)
|
||||
warnings.Add("SkeletonDataAsset requires tk2DSpriteCollectionData.");
|
||||
else
|
||||
warnings.Add("Your sprite collection may have missing images.");
|
||||
// else
|
||||
// warnings.Add("Your sprite collection may have missing images.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,6 +341,8 @@ namespace Spine.Unity.Modules.AttachmentTools {
|
||||
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) {
|
||||
Texture2D sourceTexture = ar.GetMainTexture();
|
||||
Rect r = ar.GetUnityRect(sourceTexture.height);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user