To include blend mode materials when using the GetRepackedSkin()
function, you will need to modify the method to handle the creation and assignment of materials with the desired blend modes. The standard GetRepackedSkin()
method focuses on repacking textures into a new atlas and does not inherently manage different material properties, such as blend modes, beyond the primary texture.
For handling materials with specific blend modes like "Screen," you would typically need to ensure that the repacking process is aware of these materials and applies them appropriately to the new attachments. This might involve extending the functionality of GetRepackedSkin()
to include additional parameters for blend modes or to manually adjust the materials after repacking.
Repacking with normal maps is related, suggesting to modify the method to include additional texture properties. You might consider a similar approach for blend modes by identifying which attachments use special materials and ensuring those materials are recreated and applied to the corresponding attachments in the repacked skin.
If the current Spine runtime does not support this functionality out of the box, you may need to customize the GetRepackedSkin()
method or post-process the repacked skins to assign the correct materials with the desired blend modes. This could involve tracking which attachments require special materials and applying those materials after the repacking process.