mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +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.
|
||||
*****************************************************************************/
|
||||
|
||||
#pragma warning disable 0219
|
||||
|
||||
// Contributed by: Mitch Thompson
|
||||
|
||||
#define SPINE_SKELETONANIMATOR
|
||||
@ -929,10 +927,15 @@ namespace Spine.Unity.Editor {
|
||||
Texture2D texture = (Texture2D)AssetDatabase.LoadAssetAtPath(texturePath, typeof(Texture2D));
|
||||
|
||||
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.textureFormat = TextureImporterFormat.AutomaticTruecolor;
|
||||
#endif
|
||||
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.maxTextureSize = 2048;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user