mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-07 03:06:55 +08:00
[unity] Handle obsolete TextureImporter API in 5.5
This commit is contained in:
parent
d52d2e72ee
commit
a400ee3bf2
@ -28,8 +28,6 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#pragma warning disable 0219
|
|
||||||
|
|
||||||
// Contributed by: Mitch Thompson
|
// Contributed by: Mitch Thompson
|
||||||
|
|
||||||
#define SPINE_SKELETONANIMATOR
|
#define SPINE_SKELETONANIMATOR
|
||||||
@ -929,10 +927,15 @@ namespace Spine.Unity.Editor {
|
|||||||
Texture2D texture = (Texture2D)AssetDatabase.LoadAssetAtPath(texturePath, typeof(Texture2D));
|
Texture2D texture = (Texture2D)AssetDatabase.LoadAssetAtPath(texturePath, typeof(Texture2D));
|
||||||
|
|
||||||
TextureImporter texImporter = (TextureImporter)TextureImporter.GetAtPath(texturePath);
|
TextureImporter texImporter = (TextureImporter)TextureImporter.GetAtPath(texturePath);
|
||||||
|
#if UNITY_5_5_OR_NEWER
|
||||||
|
texImporter.textureCompression = TextureImporterCompression.Uncompressed;
|
||||||
|
texImporter.alphaSource = TextureImporterAlphaSource.FromInput;
|
||||||
|
#else
|
||||||
texImporter.textureType = TextureImporterType.Advanced;
|
texImporter.textureType = TextureImporterType.Advanced;
|
||||||
texImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
|
texImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor;
|
||||||
|
#endif
|
||||||
texImporter.mipmapEnabled = false;
|
texImporter.mipmapEnabled = false;
|
||||||
texImporter.alphaIsTransparency = false;
|
texImporter.alphaIsTransparency = false; // Prevent the texture importer from applying bleed to the transparent parts.
|
||||||
texImporter.spriteImportMode = SpriteImportMode.None;
|
texImporter.spriteImportMode = SpriteImportMode.None;
|
||||||
texImporter.maxTextureSize = 2048;
|
texImporter.maxTextureSize = 2048;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user