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 - วิทยาศาสตร์และเทคโนโลยี
Great video Jacob, really helpful to get a quick grasp of the changes with Godot 4
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!
So basically @export just makes the variable public to the inspector?
Great tutorial
Thanks. Very useful video.
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)
Interestingly when you had the hover text as = “” it said placeholder
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!
@14:00 my ear caught some BotW BG music. Possibly Rito Village...
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://" ???
Can you set a variable as @export in an "Autoload" singleton global script and assign it from the editor?
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
Hey would love a C sharp version of this thank you!
How can I hide the script name at the top of the inspector. The scriptname category.
Great video, new subscriber here from GameDev Journey's recommendation!
(OFF) Any reason why you mix PascalCase with snake_case? 😅
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.
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
nice video thx.
is this a GDScript 2.0 thing only, or does this have any correspondence on C# scripts ?
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!
It would be great if it had a export action button, so we could call methods in the script.
I just use a Boolean that sets itself to false when it's finished what it's doing
When I tried using "@export_node_path(Sprite2D)" I got an error message saying that Sprite2D "isn't a constant expression". Any suggestions?
why some uses @export ***, some use @export_***?
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)