Announcement

Collapse
No announcement yet.

TMap<> Replication - exposing to Unreal reflection.

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

    #16
    So... TMaps can't be replicated yet?!
    | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      #17
      since something like TArray can be only be really searched linearly,
      Was just sumbling over that part in the post...
      What about the FindByPredicate() method ? Does this also just do a linear search internally?
      I somehow thought that it would be more efficient than a loop....

      Comment


        #18
        what the ****, is this ****

        i cant believe this tmap does not replicate. gosh, what the hell is wrong with unreal developers.

        if something does not work at all please remove it.. now I will need to change all my code

        Comment


          #19
          Originally posted by mirrorlink View Post
          I cant believe this tmap does not replicate. gosh, what the hell is wrong with unreal developers.

          if something does not work at all please remove it.. now I will need to change all my code
          There are better ways. It's not exactly efficient to replicate them anyway. TMaps work fine, they just don't support replication (like the vast majority of other UE containers and types).

          Also, don't swear pls. Forum Rules

          Has anyone actually tested this before bleating on about it's lack of support? I know maps that are created by BP don't support it, but if you create them in C++ and provide a NetSerialize function for your custom USTRUCT, it may work.
          Last edited by TheJamsh; 05-14-2017, 06:35 AM.

          Comment


            #20
            I don't understand why it's so difficult to replicate a TMap, what are the programming challenges involved? Any situation I can think of has an obvious solution.

            Comment


              #21
              Okay, just tested it in C++ - definitely doesn't work. Tried using both a USTRUCT as the Key and an int32, it compiles (without the USTRUCT key), but game crashes in PropertyMap.cpp Line 417.

              Comment


                #22
                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)
                They broke the signatures so I removed mine thinking it'd be awhile. The signatures work again, but I haven't redone my signature yet.

                Comment


                  #23
                  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.
                  Gesture Tracker VR: A Gesture Recognition Plugin

                  Comment


                    #24
                    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).

                    Comment


                      #25
                      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.

                      Comment


                        #26
                        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.

                        Comment


                          #27
                          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?
                          Gesture Tracker VR: A Gesture Recognition Plugin

                          Comment


                            #28
                            So.. Still no TMap replication in 2018, 20 years later?

                            Comment


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

                              Comment


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

                                Comment

                                Working...
                                X