Author Topic: TNObject where rebuildMethodList = false?  (Read 1593 times)

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
TNObject where rebuildMethodList = false?
« on: August 01, 2014, 11:33:54 AM »
Hey Aren,

We recently started using TNET for adding multiplayer to our product crazy late in the dev process. Amazingly, the process has been pretty good. Which I attribute to the quality of the TNET plugin.

We're concerned with the overhead of rebuilding the RFC method list (mainly since it checks public/private/instance methods on the game object). The main reason we want a TNObject on our objects was because we wanted a network synced UID that we could use to find units on each of the end-users's machine.

So to confirm our understanding of how this works, unless the object receives an RFC that it manages, the method list isn't recomputed for the entire hierarchy? If we add a TNObject with a 0 UID to the unit's GameObject that we sync with a TNManager.Create, it would only rebuild the method list if that unit received an RFC call, right? In our case, there aren't any RFCs on the unit (since the UID is the only thing we care about) so the method list shouldn't be rebuilt?

If it does execute the rebuild method, is there a way you can recommend that we create a TNObject with a rebuildMethodList = false so that we can make sure we don't spend the reflection time to find all of the RFC calls?

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNObject where rebuildMethodList = false?
« Reply #1 on: August 01, 2014, 09:44:25 PM »
RFC list doesn't get rebuilt unless you happen to add a script deriving from TNBehaviour. Receiving an RFC doesn't cause the list to be rebuilt -- merely reused. The list is first built when TNObject starts up.