![]() ![]() It is good practice to split Sprite Textures into multiple smaller Atlases according to their common usage.Īnother way to reduce performance overhead is to reduce the empty space between packed Textures in the Sprite Atlas. To optimize Sprite Atlas usage, ideally all or most Sprites that are active in the Scene should belong to the same Atlas. This can cause excessive performance overhead if Unity loads a Sprite Atlas with very large Textures when nothing in the Scene is using most of those Textures. More info See in Glossary, Unity loads the Sprite Atlas it belongs to and all the Textures it contains. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. Think of each unique Scene file as a unique level. When a Sprite is active in a Scene A Scene contains the environments and menus of your game. Optimizing Sprite Atlas usage and size for improved performance Enable or disable the ‘Include in Build’ property to control which Sprite Atlases are included in the Project build.Ĭlearing ‘Include in Build’ disables this behavior, and is done when preparing a Sprite Atlas for distribution. More info See in Glossary and automatically loads them at the build’s run time. This means that Unity includes the Sprite Atlases with the Project’s build The process of compiling your project into a format that is ready to run on a specific platform or platforms. Select Pack Preview to preview the combined Atlas Texture in the Asset Preview window.Īll Sprite Atlases have Include in Build enabled by default when created. To replace an item, drag another item to the row it occupies to replace it on the list. To remove an item from the list, click the minus ( -) icon at the lower right of the Objects For Packing list. Select an Asset from the Object Picker window to add it to the list: Drag a valid Asset onto an empty row to add it to the list, or select the circle icon to the right of the row to open the Select Object window. To add items, select the plus ( +) icon at the lower right of the list to create a new row. It displays the list of items for Unity to pack when it builds the Sprite Atlas. Select the Sprite Atlas Asset and find the Objects For Packing list in its Inspector A Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. Drag and drop a folder directly onto the list to automatically add all valid content within the folder to the list (only the folder appears on the list). You can place Texture2D and Sprite Assets in this list. The Objects for Packing list displays the currently selected items that are in the Sprite Atlas. Selecting items for the Objects for Packing list Unity creates the Sprite Atlas in the Asset folder, with the file extension *. To create the Sprite Atlas Asset, go to Assets > Create > 2D > Sprite Atlas. (Optional) Optimize Sprite Atlas usage and size in your Project for improved performance. ![]() Sprites prepared for distribution need to be loaded via Late Binding with a script.(Optional) Prepare Sprite Atlases for distribution.(Optional) Create a Variant Sprite Atlas.Enable Include in build on Sprite Atlases to include them with the project. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |