+3 votes

I'm using some free placeholder assets for my project, but some of them are in sprite sheets. I've seen that Texture Atlas is far more efficient than having individual textures for each item. However, all the examples for using the Texture Atlas is for animations. For my situation, I've got a large selection of item icons, some with different sizes. I noticed that the auto slice will correctly encapsulate the individual sprites, but that's seemingly only for editor ui convenience.

Is there something similar to how Tilesets work, but for textures? Being able to mark out and make individual sprites with names and unique IDs is what I'm after.

Godot version 3.3.2
in Engine by (40 points)

1 Answer

0 votes

Maybe you are looking for texture region.
Click the sprite and under the properties enable Texture Region. You can then edit the texture region by clicking Texture Region tab(It'll show at the bottom of the screen just like Output and Debug tabs.

by (2,017 points)

Unfortunately I've tried that and there doesn't seem to be any way via code to pick different regions. Also when using the same resource on multiple texture button fields, but selecting a different region manually, causes previous region selects to change to the new one.

I don't understand why tileset lets you make IDed tiles, but there's no option like that for textures.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.