Author Topic: Remove all saved RFC calls from a specific TNObject?  (Read 2991 times)

tylerglaiel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Remove all saved RFC calls from a specific TNObject?
« on: January 23, 2014, 06:10:38 PM »
Hey, in Unity networking I could remove all saved RPCs from a specific NetworkView with

  1. Network.RemoveRPCs(networkView.viewID);

but TNObject.Remove wants an RFC id

Is there a way to clear all saved RFCs from a specific object without calling Remove once for every object?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Remove all saved RFC calls from a specific TNObject?
« Reply #1 on: January 24, 2014, 11:16:20 AM »
RFCs are transparent from your point of view. As long as the object exists, so do its RFCs. If you remove the object (TNManager.Destroy), its RFCs go away automatically. Why would you want to remove its RFCs without removing the object?

tylerglaiel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Remove all saved RFC calls from a specific TNObject?
« Reply #2 on: January 24, 2014, 01:37:54 PM »
I have an object that handles the level tilemap, when the tilemap reloads, any RFCs that effected the previous map on it no longer apply so I liked to clear them out (so joining an in-progress game doesn't take forever if the server has been running a while). I could delete the whole tilemap and recreate it when the game loads a new one but it seems like overkill and would require me rebuilding a bunch of references to it in other parts of the game every time that happens.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Remove all saved RFC calls from a specific TNObject?
« Reply #3 on: January 25, 2014, 02:43:48 AM »
All persistent RFCs you set overwrite previous ones. It's not Unity's networking where they are all cumulative. TNet doesn't do such foolishness.

So don't worry. Only the latest state is kept.