Giter Club home page Giter Club logo

Comments (6)

aekobear avatar aekobear commented on August 16, 2024 3

I had some trouble using the MRP locally, so I attempted to reproduce the bug in a new project using godot-cpp, and, unfortunately, I was unable to. I've attached my new project - perhaps, you can help me modify it in order to show the bug?

Thanks for trying this out! I tested your cpp project and it does seem to be working as intended. Let me take this info back to the GDExt-rust people and see if there's a discrepancy on the rust side making it behave differently than godot-cpp

from godot.

dsnopek avatar dsnopek commented on August 16, 2024 2

@Bromeon Can you check if this is a bug in the Rust bindings or something we broke in Godot 4.3 that affects the Rust bindings? As noted above, so far we haven't been able to reproduce it with godot-cpp. Thanks!

from godot.

akien-mga avatar akien-mga commented on August 16, 2024

CC @godotengine/gdextension @godotengine/gdscript

from godot.

dsnopek avatar dsnopek commented on August 16, 2024

Thanks!

I had some trouble using the MRP locally, so I attempted to reproduce the bug in a new project using godot-cpp, and, unfortunately, I was unable to. I've attached my new project - perhaps, you can help me modify it in order to show the bug?

I tried the project in Godot 4.2.2, and the CustomResource resources stayed as CustomResources and had the expected methods when running the project. Then I tried in Godot 4.3-beta2, and even edited the "SomeNode" in the editor, and saved the project a bunch of times, but every time I ran it, it also had the expected methods and I didn't see the resources change type.

from godot.

Bromeon avatar Bromeon commented on August 16, 2024

In Godot 4.3 beta 2:

  • when I run my game, CustomResource acts exactly like MyResource and does not have any of my custom behavior implemented in the GDScript.
  • when I save and close Godot, the .tscn file serializes the resource as MyResource with no reference to the CustomResource GDScript

In Godot 4.2 stable:

  • when I run my game, CustomResource behaves as expected
  • when I save and close Godot, the .tscn contains a script = ExtResource() pointing the resource to the appropriate GDScript

I downloaded your ZIP file, but couldn't quite follow these instructions. Even with 4.2.2, I get

SCRIPT ERROR: Invalid call. Nonexistent function 'update' in base 'MyResource'.
          at: _process (res://broken/broken.gd:8)

Are the initial scene files serialized correctly?


I would appreciate if you could reduce this example further, so that I can simply start it with:

$GODOT4_BIN --headless

and it would output "OK" or "FAIL" on the console. Then I wouldn't need to open the editor, save scenes, check diffs etc. Otherwise it's extremely time-consuming to bisect a larger range of versions.

Would that be possible? I'll only get around to look into it next week, so take your time.

from godot.

dsnopek avatar dsnopek commented on August 16, 2024

With Bromeon's guidance, I changed the dependencies in the Cargo.toml so that I could build a version of the extension that would work in both Godot v4.2.2 and Godot v4.3-beta2, for the purpose of git bisecting to the commit that introduced the issue:

# Changed "api-custom" to "api-4-2"
godot = { git = "https://github.com/godot-rust/gdext", branch = "master", features = ["api-4-2"] }

However, when I tried in both Godot v4.2.2 and Godot v4.3-beta2, I was unable to reproduce the issue.

Perhaps the build was created on an older commit of the Rust bindings that had a bug?

@aekobear Can you try rebuilding the extension with the latest master of the Rust bindings and "api-4-2" and see if you're still experiencing the issue?

UPDATE: Here is a ZIP with the libextension.so that I built for Linux, in case anyone wants to try dropping that into the MRP.

from godot.

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.