klawr icon indicating copy to clipboard operation
klawr copied to clipboard

C# wrapper class should check its UObjectHandle is valid before calling native wrapper function

Open enlight opened this issue 10 years ago • 0 comments

Currently the internal UObjectHandle in a generated C# wrapper class is only valid after the game/PIE starts, but instances of the wrapper class itself are created in the editor prior to that (possibly multiple times). So attempting to call any native methods or access any native properties in the constructor of a subclass of one of the wrapper classes will not work, and will result in an assertion in the native code. Preferably the managed wrapper method/property shouldn't even call the native wrapper function if the internal UObjectHandle is invalid.

enlight avatar Aug 20 '14 07:08 enlight