Announcement

Collapse
No announcement yet.

TMap<> Replication - exposing to Unreal reflection.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    How mirror TMap logic via array?

    Leave a comment:


  • replied
    Yes, I know half of engine would have to change lol...
    But one gotta dream for life.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    There's optimizations for FVector replication; could be there optimizations for TMap as well.
    Sure, but it would be hideously complex - did you look at the array replication stuff? They've probably decided it isn't worth the effort vs manually handling the few cases where a replicated map is useful.

    Leave a comment:


  • replied
    There's optimizations for FVector replication; could be there optimizations for TMap as well.

    Leave a comment:


  • replied
    As people said earlier, TMap replication would be horribly inefficient even if it worked. It'd be a bad practice all the way through. Think of the lack of support as a enforcing good programming practices.

    Leave a comment:


  • replied
    Originally posted by Zeblote View Post
    What do you even need to replicate a map for, that you can't easily work around by using rpcs or similar?
    That's a silly comment, the same can be said for any other type.

    Leave a comment:


  • replied
    What do you even need to replicate a map for, that you can't easily work around by using rpcs or similar?

    Leave a comment:


  • replied
    What will be first - HL3 from Valve or TMap replication from Epic?
    I bet on Epic - they are half step ahead

    Leave a comment:


  • replied
    So.. Still no TMap replication in 2018, 20 years later?

    Leave a comment:


  • replied
    Originally posted by Syed View Post
    I know map has certain features which do not present in array (array is simple) but if it is searching, then there is a workaround for array and it *may* have the same performance. It is better than waiting for features which has no definite delivery date.

    The workaround which is sort and then binary search is not difficult to implement.
    The array I'm working with in this case is small so it's not a big deal. Does FName have a predicate defined by default for sorting?

    Leave a comment:


  • replied
    I know map has certain features which do not present in array (array is simple) but if it is searching, then there is a workaround for array and it *may* have the same performance. It is better than waiting for features which has no definite delivery date.

    The workaround which is sort and then binary search is not difficult to implement.

    Leave a comment:


  • replied
    Originally posted by Syed View Post
    What is not ideal? If it is search, then you can employ binary search. If the array count is 1000, worst case scenario is number of loop is only 10 (vs 1000 if linear search).
    Obviously there are cases where a map is better than an array or there would be no reason for its existence.

    Leave a comment:


  • replied
    Originally posted by hdelattre View Post
    I've just run into this issue too. I'm replicating a TMap<FName, float> that's causing a crash when NetSerializeItem is called (PropertyMap.cpp:417). Are there any plans to fix this? I can use an array but it's not ideal.
    What is not ideal? If it is search, then you can employ binary search. If the array count is 1000, worst case scenario is number of loop is only 10 (vs 1000 if linear search).

    Leave a comment:


  • replied
    I've just run into this issue too. I'm replicating a TMap<FName, float> that's causing a crash when NetSerializeItem is called (PropertyMap.cpp:417). Are there any plans to fix this? I can use an array but it's not ideal.

    Leave a comment:


  • replied
    Originally posted by TheJamsh View Post
    Has anyone actually tested this before bleating on about it's lack of support?
    Originally posted by TheJamsh View Post
    Okay, just tested it in C++ - definitely doesn't work.
    Nice!

    If most people are like me, they'd have started bleating on after discovering that crash. (though I guess I've not been bleating on)

    Leave a comment:

Working...
X