New Export Syntax in Godot 4! || Godot Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 มิ.ย. 2024
  • Exporting is different in Godot 4, so let's learn some of the new syntax and just about everything you can export to use in the editor!
    Project: github.com/jacobfoxe/Exportin...
    ~Verdancy Vale~
    Check out Verdancy Vale: verdancyvale.net
    Newsletter: verdancyvale.net/newsletter
    Verdancy Vale Kickstarter: www.kickstarter.com/projects/...
    ~Links~
    Twitter: / thatfoxe
    Twitch: / thatfoxe
    Watch me play D&D: th-cam.com/channels/R7s.html...
    ~Timestamps~
    00:00 Intro
    00:38 Categories
    03:33 Basic Exports
    04:50 Placeholders
    06:00 Multilines
    06:59 Enums (Method 1)
    08:50 Enums (Method 2)
    10:39 Ranges
    12:01 Easing/Curves
    13:01 Export Flags
    14:10 Resources
    16:58 Node Paths
    18:12 Files/Directories
    19:05 Colors
    20:01 Comment Documentation
    21:54 Outro
    22:58 Verdancy Vale Updates
    All music is from GameChops!: / gamechops
    #godot #godotengine #export #verdancyvale
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 25

  • @overdox285
    @overdox285 ปีที่แล้ว +7

    Great video Jacob, really helpful to get a quick grasp of the changes with Godot 4

  • @palatonian9618
    @palatonian9618 5 หลายเดือนก่อน +1

    This was such a great video. Answered so many questions I have had after almost a month of searching tutorials and docs. Of course part of the problem is I am a coding newb but glad I found something that helped!

  • @user-ww6wl5sx7l
    @user-ww6wl5sx7l 8 หลายเดือนก่อน +5

    So basically @export just makes the variable public to the inspector?

  • @jorgiz0
    @jorgiz0 ปีที่แล้ว +2

    Great tutorial

  • @giantfrogstudios839
    @giantfrogstudios839 ปีที่แล้ว

    Thanks. Very useful video.

  • @Polygarden
    @Polygarden ปีที่แล้ว

    This is great! Thanks for compiling the tutorial! I was wondering already, because it got really messy when you have lots of variables in old Godot 3.x. Do you know by any chance, if it's possible to get these groups and categories back by script? (like with a "get_properties" call on a resource, for in-game editor use or similar)

  • @1gengabe
    @1gengabe ปีที่แล้ว +4

    Interestingly when you had the hover text as = “” it said placeholder

    • @jacobfoxe4691
      @jacobfoxe4691  ปีที่แล้ว +3

      Yeah, I noticed that while editing and freaked out a little. There's an issue in the engine (at least as of beta10) that sets any strings to when not assigned, so maybe assigning "" to placeholder was enough for it not to overwrite it with . Weird, regardless!

  • @ZPaul2Fresh8
    @ZPaul2Fresh8 ปีที่แล้ว +1

    @14:00 my ear caught some BotW BG music. Possibly Rito Village...

  • @supremacyecg6815
    @supremacyecg6815 10 หลายเดือนก่อน

    I started making a card game and your tutorial is very useful! :)
    Edit: I have a few questions.
    1. Is it possible to make @export appear when we make a selection?
    e.g. I have a choice of "Unit" or "Ability" card
    If I choose Unit, next @export will be: "Soldier" "Spaceship" "Tank"
    Or if I choose an ability it will be: "Weapon" "Equipment" "Trap"???
    2. Can I edit export_enum somehow? I mean I want to set the frame selection to the card, but it's a long path text, and I'd like it to be a short text like "Red" "Blue" or otherwise is there a way to preview the images???
    3. Is it possible in export_file to refer directly to the folder where the files are to be selected, or do you always have to start with "res://" ???

  • @angelrubiov
    @angelrubiov 8 หลายเดือนก่อน +1

    Can you set a variable as @export in an "Autoload" singleton global script and assign it from the editor?

  • @shirotonbo6315
    @shirotonbo6315 2 หลายเดือนก่อน

    Hey man, how do i make conditional export enum? Like if i choose between weapon or consumable the next option will appear: axe sword etc if i choose weapon or potion bomb etc if i choose consumable

  • @kepazino
    @kepazino 8 หลายเดือนก่อน

    Hey would love a C sharp version of this thank you!

  • @marczamp4737
    @marczamp4737 9 วันที่ผ่านมา

    How can I hide the script name at the top of the inspector. The scriptname category.

  • @joelgomes1994
    @joelgomes1994 ปีที่แล้ว +3

    Great video, new subscriber here from GameDev Journey's recommendation!
    (OFF) Any reason why you mix PascalCase with snake_case? 😅

    • @PretendCoding
      @PretendCoding ปีที่แล้ว +1

      I'm assuming it's because of old habits from other programming languages. I used PascalCase a lot in the past, so switching to a new convention is a little jarring.

    • @jacobfoxe4691
      @jacobfoxe4691  ปีที่แล้ว +1

      This made me laugh so much, ngl. It's kind of a weird amalgam of all of the industries/companies I've worked at, honestly. I do a lot of low-level C coding, so I'm used to camelCase, though I often try to use more of a Godot-focused snake_case when doing tutorials to make things more readable and styleable to a 'learning programming for the first time' crowd. The PascalCase gets mixed in when I forget all of the above and throw caution to the wind

  • @DragonByte79
    @DragonByte79 ปีที่แล้ว

    nice video thx.

  • @AlexandreOliveira-us5sy
    @AlexandreOliveira-us5sy ปีที่แล้ว

    is this a GDScript 2.0 thing only, or does this have any correspondence on C# scripts ?

    • @jacobfoxe4691
      @jacobfoxe4691  ปีที่แล้ว

      Honestly, I have no idea about the C# side of Godot (well, I did, but w/ the update to 4.0, I have 0 confidence in it)! My assumption is that C# syntax for exports is unchanged, but I'd love to know if I'm wrong!

  • @pauloviniciuscoral1128
    @pauloviniciuscoral1128 8 หลายเดือนก่อน

    It would be great if it had a export action button, so we could call methods in the script.

    • @TheAce736
      @TheAce736 8 หลายเดือนก่อน

      I just use a Boolean that sets itself to false when it's finished what it's doing

  • @affluenzashot
    @affluenzashot 3 วันที่ผ่านมา

    When I tried using "@export_node_path(Sprite2D)" I got an error message saying that Sprite2D "isn't a constant expression". Any suggestions?

  • @vinciarts
    @vinciarts ปีที่แล้ว

    why some uses @export ***, some use @export_***?

    • @jacobfoxe4691
      @jacobfoxe4691  ปีที่แล้ว

      It's just a fun quirk of Gdscript 2's syntax, really. Whereas in GDScript 1, all exported variables utilized the same syntax, now, we can use special @export_* syntax for increased readability + functionality (not to mention higher performance)