- Home /
Sprite trim from code using alpha.
We have hundreds of assets that have varying size and needs to be trimmed. In sprite editor at top left there is trim button does exactly this. How can I access this functionality from code?
Answer by Hauthorn · Jul 03, 2020 at 03:13 PM
I don't know of a way to call this function yourself, but you could look at the code that button uses. I found it in SpriteFrameModule
class in a file Packages/2D Sprite/Editor/SpriteEditorModule/SpriteFrameModule.cs
You could use this as a guide to derive your own, similar behavior.
Your answer
Follow this Question
Related Questions
2D sprite wavering 0 Answers
Changing the sprite of a prefab with in a script? 1 Answer
Importing Post Processing Stack didn't clear the errors 0 Answers
How do I assign a variable the proper sprite in the script? (C#) 1 Answer
How Can I Change Sprite Max Size,Format and Compressor Quality in My Script 1 Answer