0 votes

example (the file itself is the same) for 2 different versions of Godot 3X and 4,
I tried to redo it for godot 4, but there are no such methods: also in the documentation there is not yet a description of all methods, can someone help or update the example for the relevant version

error: Invalid call. Nonexistent function 'set_meta' in base 'int'.

func queue_resource(path, p_in_front = false):
_lock("queue_resource")
if path in pending:
    _unlock("queue_resource")
    return
elif ResourceLoader.has_cached(path):
    var res = ResourceLoader.load(path)
    pending[path] = res
    _unlock("queue_resource")
    return
else: 
    var res = ResourceLoader.load_threaded_request(path)
    res.set_meta("path", path)
    if p_in_front:
        queue.insert(0, res)
    else:
        queue.push_back(res)
    pending[path] = res
    _post("queue_resource")
    _unlock("queue_resource")
    return
Godot version 4 Beta 2
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.