private void TryRegisterCallback<T>(IPhotonViewCallback obj, ref List<T> list, bool add) where T : class, IPhotonViewCallback { T iobj = obj as T; if (iobj != null) { RegisterCallback(iobj, ref list, add); } }
/// <summary> /// Remove object from this PhotonView's callback list for T. /// T is the IOnPhotonViewCallback derived interface you want removed from its associated callback list. /// Supplying IOnPhotonViewCallback (the interface base class) as T will remove ALL implemented IOnPhotonViewCallback Interfaces found on the object. /// </summary> public void RemoveCallback <T>(IPhotonViewCallback obj) where T : class, IPhotonViewCallback { CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, typeof(T), false)); }
/// <summary> /// Remove object from all applicable callback interfaces. Object must implement at least one IOnPhotonViewCallback derived interface. /// </summary> /// <param name="obj">An object that implements OnPhotonView callback interface(s).</param> public void RemoveCallbackTarget(IPhotonViewCallback obj) { CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, null, false)); }
/// <summary> /// Add object to all applicable callback interfaces. Object must implement at least one IOnPhotonViewCallback derived interface. /// </summary> /// <param name="obj">An object that implements OnPhotonView callback interface(s).</param> public void AddCallbackTarget(IPhotonViewCallback obj) { CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, null, true)); }
public CallbackTargetChange(IPhotonViewCallback obj, Type type, bool add) { this.obj = obj; this.type = type; this.add = add; }
public bool add; // 0x10 // Constructors public CallbackTargetChange(IPhotonViewCallback obj, Type type, bool add) { this.obj = default; this.type = default; this.add = default; } // 0x000000018020C290-0x000000018020C300