|
@@ -217,7 +217,10 @@ namespace Spine.Unity.AttachmentTools {
|
|
|
|
|
|
#region Runtime Repacking
|
|
|
/// <summary>
|
|
|
- /// Fills the outputAttachments list with new attachment objects based on the attachments in sourceAttachments, but mapped to a new single texture using the same material.</summary>
|
|
|
+ /// Fills the outputAttachments list with new attachment objects based on the attachments in sourceAttachments,
|
|
|
+ /// but mapped to a new single texture using the same material.</summary>
|
|
|
+ /// <remarks>Returned <c>Material</c> and <c>Texture</c> behave like <c>new Texture2D()</c>, thus you need to call <c>Destroy()</c>
|
|
|
+ /// to free resources.</remarks>
|
|
|
/// <param name="sourceAttachments">The list of attachments to be repacked.</param>
|
|
|
/// <param name = "outputAttachments">The List(Attachment) to populate with the newly created Attachment objects.</param>
|
|
|
///
|
|
@@ -310,7 +313,9 @@ namespace Spine.Unity.AttachmentTools {
|
|
|
/// Creates and populates a duplicate skin with cloned attachments that are backed by a new packed texture atlas
|
|
|
/// comprised of all the regions from the original skin.</summary>
|
|
|
/// <remarks>GetRepackedSkin is an expensive operation, preferably call it at level load time.
|
|
|
- /// No Spine.Atlas object is created so there is no way to find AtlasRegions except through the Attachments using them.</remarks>
|
|
|
+ /// No Spine.Atlas object is created so there is no way to find AtlasRegions except through the Attachments using them.
|
|
|
+ /// Returned <c>Material</c> and <c>Texture</c> behave like <c>new Texture2D()</c>, thus you need to call <c>Destroy()</c>
|
|
|
+ /// to free resources.</remarks>
|
|
|
/// <param name="additionalTexturePropertyIDsToCopy">Optional additional textures (such as normal maps) to copy while repacking.
|
|
|
/// To copy e.g. the main texture and normal maps, pass 'new int[] { Shader.PropertyToID("_BumpMap") }' at this parameter.</param>
|
|
|
/// <param name="additionalOutputTextures">When <c>additionalTexturePropertyIDsToCopy</c> is non-null,
|
|
@@ -342,7 +347,9 @@ namespace Spine.Unity.AttachmentTools {
|
|
|
/// Creates and populates a duplicate skin with cloned attachments that are backed by a new packed texture atlas
|
|
|
/// comprised of all the regions from the original skin.</summary>
|
|
|
/// <remarks>GetRepackedSkin is an expensive operation, preferably call it at level load time.
|
|
|
- /// No Spine.Atlas object is created so there is no way to find AtlasRegions except through the Attachments using them.</remarks>
|
|
|
+ /// No Spine.Atlas object is created so there is no way to find AtlasRegions except through the Attachments using them.
|
|
|
+ /// Returned <c>Material</c> and <c>Texture</c> behave like <c>new Texture2D()</c>, thus you need to call <c>Destroy()</c>
|
|
|
+ /// to free resources.</remarks>
|
|
|
public static Skin GetRepackedSkin (this Skin o, string newName, Shader shader, out Material outputMaterial, out Texture2D outputTexture,
|
|
|
int maxAtlasSize = 1024, int padding = 2, TextureFormat textureFormat = SpineTextureFormat, bool mipmaps = UseMipMaps,
|
|
|
Material materialPropertySource = null, bool clearCache = false, bool useOriginalNonrenderables = true,
|