Support marshaling System.Guid from C# #4941
warriordog
started this conversation in
Scripting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
System.Guid
type cannot be marshaled from C# to Godot. This makes it difficult to store UUIDs in object metadata, resources, or anything else managed by the engine. To marshal a Guid, it must be converted to/from some other type likestring
. This works, but can become very clunky when Guids must be passed back-and-forth between C# and Godot. There's also a significant parsing overhead versus just passing raw bytes around.If Guid could be marshaled directly, then those issues disappear. I can think of a few different ways to implement this:
System.Guid
. Doing this "right" would mean also exposing the new UUID type and associated logic to GDScript.Beta Was this translation helpful? Give feedback.
All reactions