Type Casting Godot GDExtension c++ - part 13

  Рет қаралды 1,849

mohsen zare

mohsen zare

Күн бұрын

Пікірлер: 17
@DylanCalaf
@DylanCalaf Жыл бұрын
These videos are absolute gold. You've earned a subscriber. Please MOAR.😄
@mohsenzare2511
@mohsenzare2511 Жыл бұрын
Thanks, Sure
@inculetbogdan
@inculetbogdan Жыл бұрын
Finally someone explained this
@mohsenzare2511
@mohsenzare2511 Жыл бұрын
Glad I can help
@NonUnknownDev
@NonUnknownDev Жыл бұрын
Awesome tutorial dude, I love this kind of content!!! for example didnt know about the TypedArray type. My suggestion for next tutorial is talking about the engine types that you dont have access while in gdscript, for example: Vector and LocalVector, TypedArray is one of them, but maybe theres more types? would love to know.
@mohsenzare2511
@mohsenzare2511 Жыл бұрын
Thanks for suggestion Yeah great Idea, I will make them as soon as I can Normally these stuff are in "godot_cpp/template" Folder In That folder there are a bunch of stuff which make you feel more the power of c++
@tommaxwellmans3
@tommaxwellmans3 Жыл бұрын
Is it possible to make a custom Basic Data Type? I want to be able to create a struct in C++ and expose it to gd script
@mohsenzare2511
@mohsenzare2511 Жыл бұрын
I don't think you can, basic dataType are part of the Godot core, you can add them by modifying the core, For example in this video I modify a basic dataType in core, Watch this video: kzbin.info/www/bejne/aZXUd3aHjt6esNk
@thomasfrewer1328
@thomasfrewer1328 9 ай бұрын
Maybe you can help with this issue I'm having. I've built a custom node and bound some methods as you've done in your videos 1-5 in this playlist. What I need is to be able to pass structs from my GDExtension C++ code into GDScript. I've got getter methods that can send individual floats and ints. I need to be able to send more information than that. I've tried declaring a struct in the same .h and .cpp file, and registering it in the register_types.cpp file. It doesn't compile when I do that. Do you know the solution to this issue?
@mohsenzare2511
@mohsenzare2511 9 ай бұрын
Anything you want to pass to GDScript should be a basic data type or inherit somehow from Object Class, and you should register that class, there is no way around that! I suggest to create a small class which inherit from RefCount (Watch my video about that) and everything which you want to pass to Gd-script just put inside that! (instead of struct) - You should also register that like a normal class so you can access that inside GDSript
@thomasfrewer1328
@thomasfrewer1328 9 ай бұрын
@@mohsenzare2511 I've registered the class and it doesn't compile. I tried inheriting from Object and from Refcount, neither one works.
@mohsenzare2511
@mohsenzare2511 9 ай бұрын
@@thomasfrewer1328 You are making an error somewhere!! what error that will give you when you want to compile?
@thomasfrewer1328
@thomasfrewer1328 9 ай бұрын
@@mohsenzare2511 So I did manage to get it to compile but then the nodes stopped showing up in the Godot editor.
@mohsenzare2511
@mohsenzare2511 9 ай бұрын
@@thomasfrewer1328 I believe your code has error somewhere!! make sure you register your class in register.cpp otherwise send me a github repo of a code which reproduce your problem, so I can tell what is the problem Here I don't have any idea
@inculetbogdan
@inculetbogdan Жыл бұрын
One thing that I don’t understand is how can we override methods made with gdextension.
@mohsenzare2511
@mohsenzare2511 Жыл бұрын
Override a method in GDExtension, works exactly same as c++ Also it is much better if the parent class method register as virtual But I don't know exactly what you want to do, So If you want to do something specific, let me know maybe I can help you more
@inculetbogdan
@inculetbogdan Жыл бұрын
@@mohsenzare2511 Im trying to override methods from gdextension in gdscript. Basically use gdextension as an interface and inherit in gdscript.
GDExtension for Android in Godot
4:36
mohsen zare
Рет қаралды 1,3 М.
skeleton v3 Beta - Migration Guide
1:34:13
Skeleton Labs
Рет қаралды 2,6 М.
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 71 МЛН
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 15 МЛН
The Singing Challenge #joker #Harriet Quinn
00:35
佐助与鸣人
Рет қаралды 36 МЛН
How To Make Asteroids in Godot 4 (Complete Tutorial)
1:55:06
Kaan Alpar
Рет қаралды 16 М.
Pong Clone in C++ // Code Review
34:31
The Cherno
Рет қаралды 96 М.
C# is BETTER than GDScript but...
5:13
hamsterbyte
Рет қаралды 30 М.
Godot & C++ -- How, What and Why?
12:56
Gamefromscratch
Рет қаралды 117 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 111 М.
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
Brian Will
Рет қаралды 2,1 МЛН
How To Use and Debug GD Extension With Godot 4.1! Advanced Godot!
1:05:41
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 71 МЛН