IPhotonViewCallbacks.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. namespace Photon.Pun
  2. {
  3. using Photon.Realtime;
  4. /// <summary>
  5. /// Empty Base class for all PhotonView callbacks.
  6. /// </summary>
  7. public interface IPhotonViewCallback
  8. {
  9. }
  10. /// <summary>
  11. /// This interface defines a callback which fires prior to the PhotonNetwork destroying the PhotonView and Gameobject.
  12. /// </summary>
  13. public interface IOnPhotonViewPreNetDestroy : IPhotonViewCallback
  14. {
  15. /// <summary>
  16. /// This method is called before Destroy() is initiated for a networked object.
  17. /// </summary>
  18. /// <param name="rootView"></param>
  19. void OnPreNetDestroy(PhotonView rootView);
  20. }
  21. /// <summary>
  22. /// This interface defines a callback for changes to the PhotonView's owner.
  23. /// </summary>
  24. public interface IOnPhotonViewOwnerChange : IPhotonViewCallback
  25. {
  26. /// <summary>
  27. /// This method will be called when the PhotonView's owner changes.
  28. /// </summary>
  29. /// <param name="newOwner"></param>
  30. /// <param name="previousOwner"></param>
  31. void OnOwnerChange(Player newOwner, Player previousOwner);
  32. }
  33. /// <summary>
  34. /// This interface defines a callback for changes to the PhotonView's controller.
  35. /// </summary>
  36. public interface IOnPhotonViewControllerChange : IPhotonViewCallback
  37. {
  38. /// <summary>
  39. /// This method will be called when the PhotonView's controller changes.
  40. /// </summary>
  41. /// <param name="newOwner"></param>
  42. /// <param name="previousOwner"></param>
  43. void OnControllerChange(Player newController, Player previousController);
  44. }
  45. }