load_sprite
Load and apply a texture image to an existing Sprite2D, Sprite3D, or TextureRect node in a Godot scene. Specify the node path and texture file relative to the project.
Instructions
Set the texture on an existing Sprite2D, Sprite3D, or TextureRect node. Use this when the node already exists; for new nodes, pass texture via add_node properties. Saves automatically. texturePath must be a real file under projectPath. Returns a plain-text confirmation message naming the loaded texture. Errors if the node is not one of those three classes, or the texture file does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodePath | Yes | Path to the target node from scene root (e.g. "root/Player/Sprite2D") | |
| scenePath | Yes | Scene file path relative to the project | |
| projectPath | Yes | Path to the Godot project directory | |
| texturePath | Yes | Path to the texture file relative to the project (e.g. "assets/player.png") |