Created
January 25, 2026 22:14
-
-
Save baba-s/b4a878f0c0fe1d73da336712434755e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEditor; | |
| namespace Kogane | |
| { | |
| internal sealed class SpriteAssetPostprocessor : AssetPostprocessor | |
| { | |
| private void OnPreprocessTexture() | |
| { | |
| var textureImporter = ( TextureImporter )assetImporter; | |
| if ( textureImporter.textureType != TextureImporterType.Sprite ) return; | |
| if ( !textureImporter.importSettingsMissing ) return; | |
| textureImporter.spriteImportMode = SpriteImportMode.Single; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment