CSharp Questions

13

Solved

I am thinking and looking for ways to save game data by c#. As a result, there seems to be a way to code and store each key and value using JSON, and a way to use resources. But I don't know how to us...
Friedman asked 21/10, 2022 at 12:6

1

Hi all, I'm having a little trouble with loading the information from a text file using FileAccess.GetFileAsString - I'm using a res:// path and DirAccess.GetFilesAt to get a list of files in a path,...
Formation asked 13/3 at 12:15

2

GD.Print(nameLabel.GetRect().Size); nameLabel.Text = name; GD.Print(nameLabel.GetRect().Size); After setting the text, the length will become longer. I want to get the size after the change, but it s...
Mills asked 5/3 at 2:3

3

Solved

My problem is that I have a characterBody 2D, and I want it to move following my vector2 coordinates. However, during the movement process, I noticed that it experiences jittering in all directions. ...
Discuss asked 2/3 at 2:39

2

I am following this tutorial to generate a terrain mesh, and converting it to C#. I am getting an error: scene/resources/mesh.cpp:354 - Condition "index >= vc" is true. Returning: Ref<TriangleM...
Concoff asked 23/9, 2023 at 23:20

2

In GDScript, I defined a signal a in A that has no parameters (which is important!). In B, I connect signal a to my event b (i: int), and I can easily bind the built-in properties in B, such as (A.a. ...
Swen asked 20/2 at 13:46

3

Solved

CardScene.Instantiate() as Card; and new Card() What is the difference between them? Why do I encounter the error of node not being found when using 'newCard()' Does anyone know? Please answer me, tha...
Downandout asked 20/2 at 11:59

2

I have encountered some problems: in GDScript, it is easy to link the signal of B in A(A.abc.connect(b)), but I am using C #. How can I implement this function. I reported an error in the code below `...
Downall asked 19/2 at 9:24

1

Hello, I'm working on a shell-based grass shader to go with my procedurally generated terrain game. The terrain is an arrayMesh, and the grass is another arrayMesh that is just the top faces of the t...
Estevez asked 17/2 at 22:2

4

I'm trying to understand how the Custom0, etc array are configured in an ArrayMesh. Issue 1: So the default is for custom arrays to be PackedByteArrays. So even though its not what I want to do ultim...
Polymorphism asked 13/2 at 18:34

6

Solved

I have an addon that needs to use a library (managed DLL). Currently I do this by adding a reference to it in the .csproj of the project using the addon, like this: <ItemGroup Condition="Exists('li...
Persephone asked 2/2 at 10:24

5

Solved

How can I achieve this in C#. I need to wait until the parent node has finished his initialization. yield(owner, "ready")
Headstream asked 22/10, 2022 at 16:13

6

Solved

Does anyone know how to see log messages (either in Visual Studio or in the Godot editor) when running a Godot game from Visual Studio? I tried: GD.Print(), Trace.Write(), Debug.Write() - none shows ...
Astomatous asked 20/9, 2023 at 10:38

5

I connected Visual Studio Code to Godot, but the main problem is that debug does not work. I already tried to fix debug using this guide: but it didn't work completely. At first Debug works fine but a...
Width asked 24/9, 2023 at 10:38

5

HI Everyone, I'm trying to add a Sprite2D node to a C# list. The code below shows now errors and builds, but the loop dies on the first iteration: var coinSprites = GetNode<Node2D>("CoinSprit...
Firmament asked 3/1 at 17:6

7

Solved

Hi everyone, I'm trying to figure out how to use await in C#. For example, I would like to run simple tween, wait for it to finish, and then run some more code. I've been experementing with something...
Elke asked 16/12, 2023 at 13:10

10

I am trying to make a room generator and i can't figure out how to fix this problem. Main Node: `public Vector2 right = new Vector2(464,0); public Vector2 left = new Vector2(-464,0); public Vector2 u...
Tobacconist asked 24/12, 2023 at 13:3

1

I have two scenes: Player and Coin. Both of these scenes are inherited from Area2D. Code of these scenes: Player: public void OnAreaEntered(Area2D area) { if (area.IsInGroup("coins")) { area.Pick...
Brumal asked 24/12, 2023 at 14:9

4

Sorry I'm new to both C# and Godot. I want to save the player's position in file. I use JsonSerializer.Serialize to convert struct into string. struct Player { public string name { get; set; } publi...
Groot asked 9/3, 2023 at 23:42

3

Is there a way to get a list of supported computer resolutions? Previously, I could get an array of supported resolutions in Unreal Engine. I don’t want to enter them manually.
Implosion asked 18/12, 2023 at 5:28

3

For my game, which is first person, I want to be able to play the game with the Joystick. I have a issue: I want to add camera movement for gamepad but what I did is not working properly.
Cesspool asked 17/12, 2023 at 13:4

3

I am recreating my friends game, and am having trouble with the jump. For some reason, the jump timer isn't being set at all and is instead lasting longer than defined, I cant figure out why its happe...
Merill asked 17/12, 2023 at 0:8

3

im using sqlite and dapper , tried entity framework but no luck there either. i used using() as well as opening and closing the connection my self to but nothing works. im going to upload the project ...
Whitecollar asked 14/12, 2023 at 13:19

4

Solved

I don't want use: node.GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(0).Name This form of code is not professional. Thanks.
Radiobiology asked 14/12, 2023 at 7:48

3

Solved

I keep trying to use it but an error says that the node does not contain a definition for it.
Hearty asked 11/12, 2023 at 16:34

© 2022 - 2024 — McMap. All rights reserved.