• RuntimesUnity
  • How to make option control to set resolution of texture?

when i making game, i usally prefer to make asset with high-resolution texture for high-quality
but in this case, some of phone get crash/lagged issue
i believe because of those big texture
i want to make option to make it performance option

Related Discussions
...

To create a performance option that allows users to set the resolution of textures in your game, you can implement a system that swaps between different texture atlases based on the selected quality setting. Here are some steps you can follow:

  1. Export Multiple Atlases: Use Spine to export multiple texture atlases at different resolutions. You can use the Scale and Suffix settings in the Spine texture packer to create these atlases. For example, you might have a high-resolution atlas for high-end devices and a lower-resolution atlas for devices with less memory.

  2. Quality Settings: In your game, implement a quality settings menu where players can choose their desired texture quality. This can be done using Unity's Quality Settings, where you can set different texture resolutions for each quality level.

  3. Runtime Texture Swapping: At runtime, based on the player's choice, load the appropriate texture atlas. You can use Unity's Addressables or AssetBundles to manage and load these assets efficiently. This approach allows you to only load the necessary textures into memory, reducing the risk of crashes or lag on lower-end devices.

  4. Mip Map Streaming: Consider using mip map streaming to dynamically load texture mipmaps based on the camera's distance to the object. This can help manage memory usage more effectively.

  5. Testing and Optimization: Test your game on various devices to ensure that the texture swapping works smoothly and that performance is optimized for each device type.

By following these steps, you can provide a flexible performance option that allows players to adjust texture quality according to their device capabilities.

Will it work with using Textures: Global Mipmap Limit in quality setting?

  • Harald ha risposto a questo messaggio

    You can use different size images at runtime than you do in the editor:
    http://esotericsoftware.com/spine-loading-skeleton-data#Scaling

    I suggest using "reasonable" size images in the editor, where the skeleton roughly fits on your screen at 100% zoom. This will make using Spine most comfortable, though Spine can handle very large images, up to what your GPU can handle. You can create art at high resolution, export it for the Spine editor at a reasonable size, and export it for runtime at the same or any other size.

    17 giorni dopo

    rmx Will it work with using Textures: Global Mipmap Limit in quality setting?

    Yes, that would also be a valid option to reduce texture size globally. Another option is to use a smaller Max Size in the Texture Importer settings.

    Another option could be to use the experimental com.esotericsoftware.spine.addressables and com.esotericsoftware.spine.on-demand-loading packages to download the required textures on-demand, and then provide different texture packages for different platforms (requiring a bit of additional code though). That solution would provide more customizability, but at the same time requires a lot more programming and setup work.