Hi, i’m starting a UE5 project for the first time and as i was making my game, i began having some issues with casting. At first it all started slow, if i played on the editor for a bit, my castings would suddenly stop working, even if they were working just fine a few minutes before.
Sometimes when the casting stopped working, it wouldn’t come back if i restarted the test, it would only come back if i restarted my PC (sometimes not even that). At that point i was pretty sure i was doing some kind of mistake and spent some time researching casting and all that.
In the meantime while i was trying to figure out what i was doing wrong, i decided to package the game, to find out how that worked (wanted to know how long it would take and what size it would be).
To my surprise, after packaging the game and launching it, the casting would work just fine, no problems at all. Even though it was working in the packaged version, i didn’t want to have a bad code that consumes too much memory and CPU usage, so i decided to implement an interface and instead of casting, i was going to use a bunch of events and functions to send variables from one blueprint to the other (since it seems to be the most correct way of doing it).
And well…guess what, now i have another problem! Not only my casting won’t work, but whenever i try to create a widget by using an interface function, in the editor, the widget doesn’t get created and added to the viewport.
I tried packaging the game again to see if it would work there and it did…
So right now i’m really confused, I’ve searched the internet quite a bit and didn’t find someone with this problem.
My guess is that my project got corrupted? I honestly have no idea.
Was wondering if someone here might be able to help me with that?
Thanks in advance!