by Player701 » Sat Nov 24, 2018 9:02 am
Graf Zahl wrote:You seem to trigger every single bit of unimplemented detail the engine has to offer. How are you managing that.?
Probably because it's not possible to know for sure what is implemented and what isn't. Even though the source code is available, I'm not very familiar with it, and even if I look in there, it's not always obvious whether something is a bug or a technical limitation.
In this particular case, I thought I would cache the default instance so that I don't have to retrieve it every time. In my code, the class name passed to GetDefaultByType is not a compile-time constant like in the above example (actually, it's not a compile-time constant there either, but that can be easily changed), and the number of actors on the level that utilize this functionality could potentially be very high, so I thought caching would be faster. If I got an error message that something couldn't be serialized, there (probably) wouldn't be any questions about it - I would just make the corresponding field transient and write a method to check if the value is not null and cache it again otherwise (and I guess I will need such a method in this case as well).
What attracted my attention here was
the lack of any obvious indication (obvious to the end-user, I mean) that a variable is not getting serialized. What I thought I would get didn't quite correspond to what I actually got, and I was quite surprised when I found out what the cause of the problem was.
[quote="Graf Zahl"]You seem to trigger every single bit of unimplemented detail the engine has to offer. How are you managing that.?[/quote]
Probably because it's not possible to know for sure what is implemented and what isn't. Even though the source code is available, I'm not very familiar with it, and even if I look in there, it's not always obvious whether something is a bug or a technical limitation.
In this particular case, I thought I would cache the default instance so that I don't have to retrieve it every time. In my code, the class name passed to GetDefaultByType is not a compile-time constant like in the above example (actually, it's not a compile-time constant there either, but that can be easily changed), and the number of actors on the level that utilize this functionality could potentially be very high, so I thought caching would be faster. If I got an error message that something couldn't be serialized, there (probably) wouldn't be any questions about it - I would just make the corresponding field transient and write a method to check if the value is not null and cache it again otherwise (and I guess I will need such a method in this case as well).
What attracted my attention here was [u]the lack of any obvious indication[/u] (obvious to the end-user, I mean) that a variable is not getting serialized. What I thought I would get didn't quite correspond to what I actually got, and I was quite surprised when I found out what the cause of the problem was.