load_sprite
Loads a texture file onto an existing Sprite2D, Sprite3D, or TextureRect node. Saves automatically and returns a confirmation message.
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 |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path relative to the project | |
| nodePath | Yes | Path to the target node from scene root (e.g. "root/Player/Sprite2D") | |
| texturePath | Yes | Path to the texture file relative to the project (e.g. "assets/player.png") |