Open kkyu123 opened 2 months ago
应该要拿到图片设置的的spritePixelsPerUnit传进去
var importer = AssetImporter.GetAtPath(assetPath) as TextureImporter;
var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.one * 0.5f, importer.spritePixelsPerUnit;);