Inherits: Texture2D < Texture < Resource < RefCounted < Object
A texture that crops out part of another Texture2D.
Texture2D resource that draws only part of its atlas texture, as defined by the region. An additional margin can also be set, which is useful for small adjustments.
Multiple AtlasTexture resources can be cropped from the same atlas. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls.
Note: AtlasTexture cannot be used in an AnimatedTexture, and may not tile properly in nodes such as TextureRect, when inside other AtlasTexture resources.
| ||
| ||
| ||
resource_local_to_scene |
|
The texture that contains the atlas. Can be any type inheriting from Texture2D, including another AtlasTexture.
false
If true, the area outside of the region is clipped to avoid bleeding of the surrounding texture pixels.
Rect2(0, 0, 0, 0)
The margin around the region. Useful for small adjustments. If the Rect2.size of this property ("w" and "h" in the editor) is set, the drawn texture is resized to fit within the margin.
Rect2(0, 0, 0, 0)
The region used to draw the atlas.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_atlastexture.html