Trying to add a class to an array. The class contain an object and an integer. However, when I destroy the SELF the class reference in the array is removed as well? How do I add by value?
UObjects
are inherently a reference semantics entity. Their lifetime and memory management is controlled by the engine.
It sounds like HerbType
should be a class reference, which you would spawn when necessary.