Skip to content

Blocks for resources get out of sync #333

@manuq

Description

@manuq

What Happened

#305 implemented drag from the Filesystem dock to the block coding canvas. It creates a value block of type String. Internally it has the file path hardcoded res://. But if the file is then renamed, the block keeps the old path. This can be improved by using the resource UID and calling get_id_path() dynamically.

How to Reproduce

  1. Drag a file from the Filesystem dock to the Block Coding canvas.
  2. Insert the new block into a "log (string)" block, and stack all into a "when starting" block.
  3. Run the scene and see the file path correctly printed in the output.
  4. Rename the file in the Filesystem dock.
  5. Run the scene again -> the old file path is printed.

Block Coding Plugin Version

v0.8.0

Godot Engine Version

v4.3

Operating System

Endless OS

Logs or command-line output

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions