Giter VIP home page Giter VIP logo

Comments (3)

raulsntos avatar raulsntos commented on June 12, 2024 1

Godot uses 64-bit types for all scalar types internally. This means that, by default, INT means long in C#. Godot can add metadata to method's when the type is not 64-bit, for example:

  • METADATA_INT_IS_INT8 means that the integer type should be sbyte in C#.
  • METADATA_INT_IS_UINT8 means that the integer type should be byte in C#.
  • METADATA_INT_IS_INT16 means that the integer type should be short in C#.
  • METADATA_INT_IS_UINT16 means that the integer type should be ushort in C#.
  • METADATA_INT_IS_INT32 means that the integer type should be int in C#.
  • METADATA_INT_IS_UINT32 means that the integer type should be uint in C#.
  • METADATA_INT_IS_INT64 means that the integer type should be long in C# (this is the default when there's no metadata).
  • METADATA_INT_IS_UINT64 means that the integer type should be ulong in C#.

Unfortunately, AFAIK signals don't have a mechanism to register metadata so their parameters must always use the 64-bit types for scalar types (long and double) to ensure they always use the right type.

from godotsteam.

Gramps avatar Gramps commented on June 12, 2024

Thanks, @raulsntos, for dropping an egg of knowledge!

After this post and the one about Rust, I need to dig back through GodotSteam to check the types on everything since this project has been going on for many years.

from godotsteam.

Gramps avatar Gramps commented on June 12, 2024

Ah, another note is that SteamMultiplayerPeer is not officially a GodotSteam project. Unless you were talking about the MultiplayerPeer branch which is but needs patched a lot. I have been going through all that and writing up a list of changes to make. I didn't work on the original / current version.

from godotsteam.

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.