obsidian/MyObsidianVault/Knowledgebase/Godot/2D/Texture Atlas generation/Create TextureRect from Texture Atlas Tile.md
2025-05-29 18:35:09 +02:00

9 lines
232 B
Markdown

Untested snippet from Perplexity
```python
var atlas = AtlasTexture.new()
atlas.atlas = load("res://path_to_your_atlas.png")
atlas.region = Rect2(128, 64, 64, 64) # Example region for a 64x64 tile
$TextureRect.texture = atlas
```