You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Describe the bug **
Using resource.set_texture on any sprite, changes texture on ALL sprites using same atlas
**To Reproduce **
Create an empty project
Create two sprites using the same atlas (The sprites can refer to same image within atlas, or different images)
Use example code from 'resource.set_texture()" entry in API docs to update texture of one of the sprites
Both sprites have been updated to use new texture
**Expected behavior **
Only sprite referred to in call to 'set_texture' should have it's texture updated.
**Defold version: **
Version 1.3.0
**Platforms : **
Platforms: Android, MacOS
OS: Android 8.0.0; MacOS Montery 12.1
Device: LG G6
**Minimal repro case project: **
There are two attachments: One using custom sprite materials & custom render-script, one using the default sprite materials & default render-script
BitsAtPlayDev
changed the title
Using resource.set_texture on any sprite, changes texture on ALL sprites
Using resource.set_texture changes texture of ALL sprites using same atlas
Mar 14, 2022
That is true, if you replace the texture, you replace the entire texture.
We currently don't have support to update a region of the texture.
As such, this is not a bug.
But perhaps you wish to file a feature request for support of getting the region/uv-coords of a sprite image inside an atlas. With that info, we can implement support for setting a sub-part of the a texture.
**Describe the bug **
Using resource.set_texture on any sprite, changes texture on ALL sprites using same atlas
**To Reproduce **
**Expected behavior **
Only sprite referred to in call to 'set_texture' should have it's texture updated.
**Defold version: **
**Platforms : **
**Minimal repro case project: **
There are two attachments: One using custom sprite materials & custom render-script, one using the default sprite materials & default render-script
SetTextureProblem_customMaterials.zip
SetTextureProblem_defaultMaterials.zip
The text was updated successfully, but these errors were encountered: