mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
03020e0ff4
@ -125,7 +125,7 @@ internal class PolygonBatch {
|
|||||||
_support.applyBlendMode(true);
|
_support.applyBlendMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (texture != _texture) {
|
if (!_texture || texture.base != _texture.base) {
|
||||||
flush();
|
flush();
|
||||||
_texture = texture;
|
_texture = texture;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -243,10 +243,10 @@ public class SkeletonSprite extends DisplayObject {
|
|||||||
continue;
|
continue;
|
||||||
for (var ii:int = 0; ii < verticesLength; ii += 2) {
|
for (var ii:int = 0; ii < verticesLength; ii += 2) {
|
||||||
var x:Number = worldVertices[ii], y:Number = worldVertices[ii + 1];
|
var x:Number = worldVertices[ii], y:Number = worldVertices[ii + 1];
|
||||||
minX = Math.min(minX, x);
|
minX = minX < x ? minX : x;
|
||||||
minY = Math.min(minY, y);
|
minY = minY < y ? minY : y;
|
||||||
maxX = Math.max(maxX, x);
|
maxX = maxX > x ? maxX : x;
|
||||||
maxY = Math.max(maxY, y);
|
maxY = maxY > y ? maxY : y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -368,8 +368,12 @@ public class SpineEditorUtilities : AssetPostprocessor {
|
|||||||
|
|
||||||
AtlasAsset atlasAsset = AtlasAsset.CreateInstance<AtlasAsset>();
|
AtlasAsset atlasAsset = AtlasAsset.CreateInstance<AtlasAsset>();
|
||||||
atlasAsset.atlasFile = atlasText;
|
atlasAsset.atlasFile = atlasText;
|
||||||
|
|
||||||
string[] atlasLines = atlasText.text.Split('\n');
|
//strip CR
|
||||||
|
string atlasStr = atlasText.text;
|
||||||
|
atlasStr = atlasStr.Replace("\r", "");
|
||||||
|
|
||||||
|
string[] atlasLines = atlasStr.Split('\n');
|
||||||
List<string> pageFiles = new List<string>();
|
List<string> pageFiles = new List<string>();
|
||||||
for(int i = 0; i < atlasLines.Length-1; i++){
|
for(int i = 0; i < atlasLines.Length-1; i++){
|
||||||
if(atlasLines[i].Length == 0)
|
if(atlasLines[i].Length == 0)
|
||||||
@ -385,6 +389,8 @@ public class SpineEditorUtilities : AssetPostprocessor {
|
|||||||
TextureImporter texImporter = (TextureImporter)TextureImporter.GetAtPath(texturePath);
|
TextureImporter texImporter = (TextureImporter)TextureImporter.GetAtPath(texturePath);
|
||||||
texImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
|
texImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
|
||||||
texImporter.mipmapEnabled = false;
|
texImporter.mipmapEnabled = false;
|
||||||
|
//TODO: Get actual size from atlas data
|
||||||
|
texImporter.maxTextureSize = 2048;
|
||||||
EditorUtility.SetDirty(texImporter);
|
EditorUtility.SetDirty(texImporter);
|
||||||
AssetDatabase.ImportAsset(texturePath);
|
AssetDatabase.ImportAsset(texturePath);
|
||||||
AssetDatabase.SaveAssets();
|
AssetDatabase.SaveAssets();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user