-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Export properties disappear in Godot editor after hot reload #433
Comments
I've found another oddity with hot-reloading enabled: I've got a fairly simple project with two classes with a few exported properties to be used by the Godot Editor. When attempting to manually reload the editor (using Project > Reload Current Project) after swapping out binaries, I am seeing a crash. This only occurs when I have
```
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Godot [86908] Date/Time: 2024-03-20 18:02:37.5457 -0500 Sleep/Wake UUID: 3B9F5689-E9F2-4184-BB16-DFA706D8C70C Time Awake Since Boot: 140000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGABRT) Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 VM Region Info: 0x545a00000008 is not in any region. Bytes after previous region: 92264487452681 Bytes before following region: 12807592476664 Application Specific Information: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread Thread 1: Thread 2: Thread 3: Thread 4: Thread 5: Thread 6: Thread 7: Thread 8: Thread 9: Thread 10: Thread 11: Thread 12:: com.apple.NSEventThread Thread 13:: caulk.messenger.shared:17 Thread 14:: caulk.messenger.shared:high Thread 15:: caulk::deferred_logger Thread 16:: com.apple.audio.IOThread.client Thread 17: Thread 18: Thread 19: Thread 20: Thread 21: Thread 22: Thread 23: Thread 0 crashed with ARM Thread State (64-bit): Binary Images: External Modification Summary: VM Region Summary:
REGION TYPE SIZE COUNT (non-coalesced) Full Report{"app_name":"Godot","timestamp":"2024-03-20 18:02:37.00 -0500","app_version":"4.2.1","slice_uuid":"b5054342-bde5-37a3-aa96-222efb3e1083","build_version":"4.2.1","platform":1,"bundleID":"org.godotengine.godot","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.3.1 (23D60)","roots_installed":0,"name":"Godot","incident_id":"CFF638B0-063C-4091-AC77-4C9B87E00D93"}
], ]
|
Hi, im looking to SwiftGodot a time, and I had some problems with hot reloading, for example, don't have documentation, but I saw in some issues how to use, I don't know if I made a wrong configuration, but isn't working. I tested on windows and on Mac, and both are crashing sometimes when hot reload, but I will remake the test on windows. The test:
// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "swift",
platforms: [.macOS(.v13)],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "swift",
type: .dynamic,
targets: ["swift"]),
],
dependencies: [
.package(url: "https://github.com/migueldeicaza/SwiftGodot", branch: "main")
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "swift",
dependencies: [
"SwiftGodot",
],
swiftSettings: [.unsafeFlags(["-suppress-warnings"])]
),
.testTarget(
name: "swiftTests",
dependencies: ["swift"]),
]
)
//
// File.swift
//
//
// Created by Emanuel on 20/06/24.
//
import SwiftGodot
@Godot
class Test: Node {
override func _ready() {
GD.print("A")
}
@Callable
func fnc() {
GD.print("B")
}
}
@Godot
class Test2: Node {
override func _ready() {
GD.print("AA")
}
@Callable
func fnc() {
GD.print("BB")
}
} MyLibrary.swift // The Swift Programming Language
// https://docs.swift.org/swift-book
import SwiftGodot
let allNodes: [Wrapped.Type] = [Test.self, Test2.self]
#initSwiftExtension(cdecl: "swift_entry_point", types: allNodes)
testing.gd: extends Node2D
@onready var test = $Test as Test
@onready var test_2 = $Test2 as Test2
func _ready():
test.fnc()
test_2.fnc()
The tests I made was:
I am considering engine crashes or not responding, if the code work and if the lsp of gdscript is working conform changesTests on Mac
The rename class can't be tested if work, because the hot reload doesn't add the class, I need to reload the engine manually. |
Given a simple class with export variables:
Assuming it is attached to a Node and the GDExtension is configured with
reloadable = true
, after updating the extension libs and hot reloading occurs, the export variables are no longer exposed/visible in the inspector UI until the editor is reloaded.Seeing this behavior with Godot 4.2.1—I don't see anything about reloadable support in the docs, but saw a few mentions about it in discussion about it so thought this would be worthy to bring up.
Bests!
The text was updated successfully, but these errors were encountered: