I understand your position, however I think there are points where we are not completely understanding each other. Letâs go in parts:
No, there is no solution for this that allows you to use both a structure and TSoftObjectPtr
The proposed OOP solution works perfectly, unlike being limited to native UE5 structures that clearly did not apply here. The object-oriented approach clearly provides the necessary flexibility in this case.
Insisting on using structures when I have already demonstrated that they did not solve the need denotes a lack of understanding of the problem.
I donât know your experience in UE5, but categorically state that âsaying there is no solution to the problemâ when I proposed a viable one doesnât make much sense.
And no one can give you good help if you withhold information. Nothing about your initial post indicated any functional requirements beyond âthis doesnât compile.â
At no point did I just say âthis doesnât compile.â I extensively detailed the functional requirement and why it was causing compilation problems. I suggest you reread the thread to understand the context before making unsubstantiated claims.
The requirement to return an interface map was 100% clear from the start. Pretending that implementation details are necessary denotes a very limited understanding of modular design.
As others have stated now, if youâre just going to complain about the limits of the engine maybe you should stop. Every piece of advice youâre going to get on this forum, for every problem you encounter, is going to be : âDonât fight the engineâ
Pointing out a specific engine limitation is not a complaint, it is identifying an area of opportunity. If UE5 canât trivially solve something as basic as returning an interface map, it seems valid to mention it as feedback.
I used OOP due to a specific lack of UE5. Optimizing the use of available tools is not âfighting the engine.â
To limit solutions in one language because it would mean using a language feature thatâs not in the subset of features present in all languages is, quite frankly, absurd.
At no time do I intend to limit the solutions in UE5 with OOP. That argument doesnât make sense. I need a specific functionality that I was able to solve in a standard way with OOP. I donât see the point in taking advantage of C++ capabilities when the native UE5 resources donât directly apply.
It is interesting that you consider that touching UE5 and C++ is enough to understand all programming and you consider that applying OOP is absurd, although in reality they are only part of a wide spectrum of areas and languages, such as web development, applications and the cloud. Each of these fields has its own complexities and challenges, so it is important not to underestimate OOP, the diversity and breadth of programming as a whole.
Guess what? Good functional practices promote maintainability and adaptability too! C++ is a multi-paradigm language. Donât ask how to hammer in a screw and then complain when people tell you to use a screwdriver instead.
Nobody rules out good functional practices. But OOP better solved the need in this specific case. Using the appropriate tool for the requirement is not âhammering a screw.â
And standards exist for both functional and object-oriented programming. Please avoid making unsubstantiated claims as what you consider to be good practice does not mean it is standard. Fighting OOP standards doesnât make much sense.