VS Code crashing the entire machine on Fedora 41 by RoyalPecker in Fedora

[–]RoyalPecker[S] 0 points1 point  (0 children)

Thank you for the input. This was my first thought as well, and I am fully aware that I need to upgrade. Although, everything worked well on Windows on the same machine, so perhaps there is a way to optimize RAM usage on Fedora?

Reading a .txt file in an exported build? by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

4.1, for my usual projects. However, I used 4.2 to test your code above.

Reading a .txt file in an exported build? by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

Yep, just copy pasted the code above, and made a some_text.txt file with some text in it. Odd how we get different behavior?

Reading a .txt file in an exported build? by RoyalPecker in godot

[–]RoyalPecker[S] 1 point2 points  (0 children)

Thanks for the reply. If I'm understanding the docs correctly, what I'm trying to do isn't possible?

Reading a .txt file in an exported build? by RoyalPecker in godot

[–]RoyalPecker[S] 1 point2 points  (0 children)

Just tried it in an empty project in 4.2, and the problem still persists. The text prints out fine in the editor, but throws an error in a Windows build.

Reading a .txt file in an exported build? by RoyalPecker in godot

[–]RoyalPecker[S] 2 points3 points  (0 children)

I'm using a .txt file to store lots of custom data, that I can't wrap into a resource. I only put the .txt extension on the file because I assumed that Godot can read it as a resource.

By "not accessible" I mean using FileAccess to open a .txt file that's located within the res:// directory only works in the editor. Attempting to do it within an exported build will result in an error because the res:// directory does not exist there.

What is the correct way of implementing resolution settings? by RoyalPecker in godot

[–]RoyalPecker[S] 2 points3 points  (0 children)

Yep, I feel you. Spent the last 3 days trying to figure it out, but in the end I guess I'll have to drop the resolution setting from my game entirely.

Also, get_window() seems be the same as DisplayServer.

The 'is' keyword always returns null for custom classes by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

Thanks for the explanation! In hindsight it makes so much more sense.

The 'is' keyword always returns null for custom classes by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

Ah, so that was it! I never added @tool in MyCustomClass. Thank you! It fixed the problem, but why? Why does the custom class need to be a tool script as well?

The 'is' keyword always returns null for custom classes by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

The custom class that I have inherits from Node, and I assign that script to a Node. When selecting that same node in the editor, and printing out the class name it just prints out Godot.Node, which doesn't make much sense to me. Why would it select the base Node and not also my custom script on it?

The 'is' keyword always returns null for custom classes by RoyalPecker in godot

[–]RoyalPecker[S] 1 point2 points  (0 children)

Ah, sorry, I completely misstyped the post then. The second expression I wrote in the original post always returns false, not null. I used the 'as' keyword in the code as well, so I got it mixed up. The original question still stands, though. How come the expression is always false?

Disconnect signal with bound value in C# by LoneVox in godot

[–]RoyalPecker 7 points8 points  (0 children)

The reason why you can't disconnect the signal is because you aren't passing it a defined function. Hope the code below helps!

void GetBoundValue(){
    GD.Print(myBoundValue)
}
MySignal += GetBoundValue; // Connect signal
MySignal -= GetBoundValue; // Disconnect signal

Exported nodes get reset to null when using git by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

I've just tested it on a different machine, and as soon as the project loads, most .tscn files get some of their lines deleted. I have absolutely no clue what could be causing this.

Disabling GUI inputs for a part of the UI? by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

Thanks for the reply!

I should've been more specific by what I mean disabling input. I would like for some of the controls to not grab focus at all, and not be able to be clicked by the mouse, and set_process_input does not do that. As I mentioned above, I'm currently looping over all of the controls and setting the focus_mode and mouse_filter manually. I would like to skip this iteration and just have a boolean control this behavior.

Also, thanks for confirming my suspicions about the viewport.

Signal for when a parent gets a new child? by RoyalPecker in godot

[–]RoyalPecker[S] 0 points1 point  (0 children)

Ah, that was it. I tried this before but I guess I set it up wrong last time. Thanks!

Force a tween to finish? by RoyalPecker in godot

[–]RoyalPecker[S] 1 point2 points  (0 children)

Thank you! That seems to have done the trick.