-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error trying to deserialize with bytes_to_var_with_objects #80229
Labels
Comments
Looks like the same issue as: |
This is still an issue and can make some things more complex, especially networking, which uses bytes_to_var_with_objects in put_var if objects are allowed. Here's a simple reproduction script if it helps: class_name Foo
extends Node
func _ready() -> void:
var dict = {object = self}
var encoded = var_to_bytes_with_objects(dict)
var object = bytes_to_var_with_objects(encoded) Hoping this gets fixed soon. Will probably just use var_to_str and str_to_var on all objects. |
no fix yet ? :( |
Thanks for reporting the bug nonetheless! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
v4.1.stable.official [9704596]
System information
Windows 10, Compatability
Issue description
I'm trying to turn an object into a PackedByteArray so I can send it across an RPC call. However, when I try to deserialize, it I get an error saying
ParserError: Class "Foo" hides a global script class
. This only happens if I include the line withbytes_to_var_with_objects
in the script.Steps to reproduce
Just run the following lines. This seems to be causing the error:
This is Foo:
Minimal reproduction project
objectSerialization.zip
The text was updated successfully, but these errors were encountered: