Error when trying to apply Start() to a Node. #284
-
So just to preface a few things, I'm following along with the Beginner dialogue tutorial over on YT and I'm attempting to do it in C#. I'm still learning both Godot and C# so this issue could absolutely be something simple I'm messing up. Also, my project code is probably atrocious since I'm starting out, just as a heads up. One other thing I should mention, is I'm not using the starting project that goes along with the tutorial, so my movement and input handling are very different. I did however clone the repo in order to grab the C# example files for Balloon.cs, balloon.tscn, and small_balloon.tscn and added them to my project. Here's a image of the error I'm getting in VSC. The error message being: "'Node' does not contain a definition for 'Start' and no accessible extension method 'Start' accepting a first argument of type 'Node' could be found (are you missing a using directive or an assembly reference?)" With my super limited knowledge I'm guessing the bit of my script shown above (which is attached to my "player" scene) can't access the Start() method established in Balloon.cs because either I'm not referencing things correctly or maybe I need a async? If you need any more info, just let me know! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You have |
Beta Was this translation helpful? Give feedback.
You have
Node
as the type of the balloon but it should be something likeBalloon balloon = Balloon.Instantiate() as Balloon;
so that the compiler can find yourStart
method.