Giter Club home page Giter Club logo

Comments (2)

tracefree avatar tracefree commented on September 22, 2024 3

Hi! It looks like this happens because the resource is initialized before you even get to choose the path in the file picker dialog. Resources don't seem to have a notification for when they are saved to disk, but the following hacky workaround using EditorFileSystem works:

@tool
extends Resource
class_name TestResource

@export var library_owner: String = await default_var()


func default_var() -> String:
	await EditorInterface.get_resource_filesystem().filesystem_changed
	print(get_path())
	return get_path()

from godot.

leandro-benedet-garcia avatar leandro-benedet-garcia commented on September 22, 2024 2

I thought that would be the issue, but what I would expect is an error to occur to tell me it could not be done, to exist a signal that is executed when a resource is created or at least a note in the documentation saying it was a expected behavior.

None of those things seem to be the case so I would say it is indeed a bug.

Ideally we would have the signal tho. That would be quite handy.

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.