Hello, with the new 4.7 update forcing us to instantiate objects inheriting from UObject using the built-in functions the editor provides, I’ve been unable to find good documentation on how to create such objects while passing an argument to the class’ constructor. Could anyone explain (or link me to a tutorial beyond the basic wiki page) how to do this?
Example:
What would be the equivalent of new UObjType( args ) with the proper engine functions?
As far as I’m aware, this has not changed with 4.7 - you should always have been using only the engine provided functions for creating UObjects, and there has always been this restriction.
Edit: It would appear this may not have been the case, given what is mentioned here. However I do not know if this documentation is now outdated. Regardless, it is clear that requiring constructor arguments for UObjects is not encouraged.
It’s related to the way UE4 initializes it’s reflected properties and class default objects. But I agree it’s not ideal, and is something I’m still waiting for some clarification on.