Code Monkey home page Code Monkey logo

gdbridge's People

Contributors

github-actions[bot] avatar jemy191 avatar meythulhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mp4 meythulhu zerxz

gdbridge's Issues

need Default constructor for generated bridge classes

Hello, I am running into a weird edge case.

When rebuilding my csharp project in my IDE, the godot editor does a cold-reload, and throws this error:

  /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs:112 - System.MissingMemberException: Cannot create script instance. The class 'PhantomCamera3DBridge' does not define a parameterless constructor.
     at Godot.Bridge.ScriptManagerBridge.CreateManagedForGodotObjectScriptInstance(IntPtr scriptPtr, IntPtr godotObject, godot_variant** args, Int32 argCount) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 146
  /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs:112 - System.MissingMemberException: Cannot create script instance. The class 'PhantomCamera3DBridge' does not define a parameterless constructor.
     at Godot.Bridge.ScriptManagerBridge.CreateManagedForGodotObjectScriptInstance(IntPtr scriptPtr, IntPtr godotObject, godot_variant** args, Int32 argCount) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 146

Not sure why the editor needs that, but it seems to be because cold-reload calls the default constructors on all .net objects.

Adding this code manually fixes the problem:

public partial class PhantomCamera3DBridge
{
   public PhantomCamera3DBridge() : base(null){}
}

so, maybe this should be added to the generated code by default?

This is on Godot 4.2

Example Leads to 404

Just trying to get this working, and noticed the link to the example in the documentation leads to a 404 (still can access it, just the doc has the dead link).

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.