Skip to content

theashtronaut/MessagePackGodot

Repository files navigation

MessagePackGodot

MessagePack for C# support for the Godot Engine

Use with the MessagePack-CSharp package.

Supports Godot 4.x, tested on Godot 4.1.x.

Usage

Install the nuget package through however you install packages in your project.

Use this code somewhere to set up the MessagePack default settings to include the GodotResolver

// initialize MessagePack resolvers
var resolver = MessagePack.Resolvers.CompositeResolver.Create(
  // enable extension packages first (and put any other extensions you use in this section)
  GodotResolver.Instance,

  // finally use standard (default) resolver
  MessagePack.Resolvers.StandardResolver.Instance
);
var options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
           
// pass options every time to set as default
MessagePackSerializer.DefaultOptions = options;

Now you should be able to serialize the godot structs and anything that has an underlying godot struct should work as well.

About

MessagePack for C# support for the Godot Engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages