#Casting is probably the best way. You
1 messages · Page 1 of 1 (latest)
you still need the type so you have to do casting anyways. ALso for data assets you do not want to do too much complexity they're just cdos for data. If you change anything that's permanent like a database or editing an asset.
Once it's data then you need to cast it to access it. Just do casting. Otherwise inteface would work but that's too much code for just grabbing data variables.
This cast will still scan all objects in my project ?
No. Casting just converts the type, so you have the hot bar with "Actionable" things. which is the base class and then when you grab one item from this you can cast it to the real data thing it is like Rifle and then read the variables from this. casting in C++ is common to do. In blueprints it can be a bit slower.
RifleData->Ammunition```
So it is only scanning the children objects of this parent object ?
it doesn't scan, asset manager scans that's another system, if you have a poiunter to your data asset and it's of another type you can change the type using casting.. okay maybe read about casting in c++.
Yes i ll read about casting. I was just said, castign must be avoided
If Actioanble if parent and Rifle is child then you can convert it but store all things Rifles, Shotguns as Actionables in your hotbar
It's slower in blueprints, not in C++, you have to do casting in C++ is very common and fast.
In Blueprints it does other things so it's a bit heavier than interfaces etc.
i m currently in BP
it's still the best way
for data assets you do not have a choice.
You still use it, just some people use tick and casting too much in bp but you still use those where you need to.
yes that seems reasonable to me
why are you asking on C++ forum if you're in BP
then do not worry about such things.
till you're on the c++ part as it will change
and those do not matter in C++ if youre' casting.
Ok thank you very much
Don't you think the workflow in C++ is slow to checktest if it's working in Unreal Editor ?
Yes its very slow unfortunately
BP compiles instantly but it's better to have code in C++ because BPs can get corrupted if you edit the C++ underneath them but C++ is just text.
However it requires a fast machine to compile and load editor for every change is very slow process. I do not know any faster way.
There is the Live Coding but it seems it can bug
I do not use that I just load editor is easier. Live coding etc. is not that good.
Its okay think of it as it's powerful you do not need it but you can use it if you're doing something complicated then the time is worth it but BP can be very fast to make games but not that reusable.
I did entire games in 1 week in BP for gamejams but in C++ I'm taking years.
Yes not reusable, I plan to remake it in Modules
I think the fastest way is testing in BP, if its ok code into CPP
for framework only
but I had to throw those 1 week games away, not reusable and hard to edit things. I'm making C++ framework but it's taking a very long time because the process is slow. I have a web background I am used to writing a line of code then seeing the changes but this is not very efficient in C++ game dev so now I write more code and then compile afterwards.
Why can't you translate your BP into CPP ?
Still that is hard to do when debugging so now I just depend on patience and do not have any expectations. When it's done it will be done but I can always reuse the same code so I only have to do it once.
That's okay for smaller games but I'm not making a game I'm making something like Lyra, so I can't do many things in BP for that.
also I do C++ mostly so it's easier for me to code it than to do in BP first.
but for contests C++ takes too long so BP is the only option to do a game in 1 week but those games do not have advanced features.
I will send you a video about balancing a dev between BP and CPP
It's okay I mostly do C++ because I'm not working in a team so most of those rules do not apply to me. I do not need BP at all.
It's not an either/or decision. Learn what makes C++ and Blueprints different, what they have in common, and how to use them together effectively. We'll also learn a thing or two about performance optimization and some basic software design concepts.
Read the article version: http://awforsythe.com/unreal/blueprints_vs_cpp/
00:00 - Introduction...
No
So you ofc need BP at some point
Yeah I'm not against it I started in BP but I do not need it for letting artists do things etc.
and I have many systems in my frameowrk that do those things automatically.
but If you rly feel your dev proces is too slow, mb you should learn BP, to fast test
so honestly I hardly have any bps in my project right now
I used to do BP then i learned C++ after this
In any game engine, at some point you need UI like BP to configure/test, doing this in C++ is very slow
But now my project is mostly C++. If I was in a team I would put more blueprints to let artists do things but otherwise I hvae been reducing reliance on the BPs to simplify the project as I'm just a solo dev and a hobbyist.
i think it's a mistake to avoid BP
Not really.. I have project setting menus and things like this.
If you felt ok with your pace, np.
But u also find this painful and slow in CPP
according to me.
using BP, testing, then translating into CPP is the fastest
Yes I'm not making a game but a framework. Otherwise if you start with bp you can convert some parts and leave the rest as is. But for bigger games you can't really do that 'cos you can't make many systems of Fortnite in BP.
Okay once you get more experience you can teach me after this. Thanks!
If you have big XP in game dev, u less need to test the code, so CPP should be enough
I do not care which is better I'm just a solo dev so for me some other factors are more important like its' easier for me to manage C++ code in source control etc.
If you work in a team then you have to obey the rules but I do not work in a team. Those rules are also for teams because artists can't use C++ so teams are forced to use BP more than is necessary for solo devs like me, then I will just have a complicated project because I followed the rules but this is not good for me who has to do the work. So I have to make my own rules and Ignore what people say or the result isn't good.
I won't teach u in game dev, yet
But I used to teach people in letting go of bad habits
Or "inceptions"
That was to help
Oh okay.. maybe you may have a future in teaching Unreal then who knows. Anyways nobody answered my question so I have to get back to work now. Good Luck!
The thing is maybe your bad habit could be trying to make people like yourself by getting rid of their bad habits. Then you shoudl start a religion if you have this mindset..
But many people in history had this mindset and they're all in Hell now and this world is Hell not better because of any of them and nobody ever got fixed. So they weren't helping anybody..
Only yourself can help you
I'm helping myself by leaving tgis conversation.