Search Unity

UNET unsubscribing events

Discussion in 'UNet' started by Chom1czek, May 11, 2016.

  1. Chom1czek

    Chom1czek

    Joined:
    Sep 19, 2015
    Posts:
    66
    Hello there, I use lots of events in my unet project and I was wondering where is the best place to unsubscribe those events? Can it be
    Code (CSharp):
    1. public override void OnNetworkDestroy()
    but it says that it will be called on clients and it should be on server side right?
    Or should I make my own event and trigger it on
    Code (CSharp):
    1. public override void OnServerStop()
    and unsubscribe all events? Any ideas?