PUN Classic (v1), PUN 2 and Bolt are in maintenance mode. PUN 2 will support Unity 2019 to 2022, but no new features will be added. Of course all your PUN & Bolt projects will continue to work and run with the known performance in the future. For any upcoming or new projects: please switch to Photon Fusion or Quantum.

.Net 콜백

PUN과 Photon Realtime .NET SDK는 클래스내에서 구현할 수 있는 콜백 인터페이스 세트를 제공합니다:

  • IConnectionCallbacks: 연결 관련 콜백.
  • IInRoomCallbacks: 룸안에서 발생한 것에 대한 콜백.
  • ILobbyCallbacks: 로비 관련 콜백.
  • IMatchmakingCallbacks: 매치메이킹 관련 콜백.
  • IOnEventCallback: 수신된 이벤트에 대한 단일 콜백. C# 이벤트 LoadBalancingClient.OnEventReceived 와 '동등' 합니다.
  • IWebRpcCallback: WebRPC 오퍼레이션 응답 수신에 대한 단일 콜백.
  • IPunInstantiateMagicCallback: PUN 프리팹의 인스턴스화에 대한 단일 콜백.
  • IPunObservable: PhotonView 직렬화 콜백.
  • IPunOwnershipCallbacks: PUN 소유권 이전 콜백.

IPunInstantiateMagicCallback을 제외한 모든 콜백 인터페이스는 등록되고 등록해제 되어야 합니다. PhotonNetwork.AddCallbackTarget(this)PhotonNetwork.RemoveCallbackTarget(this)을 호출하십시오.

예를들어 유니티에서, MonoBehaviourOnEnable()OnDisable()을 사용하실 수 있습니다.

MonoBehaviourPunCallbacks 확장하여 OnEnabled()OnDisable()을 오버라이드(override)하셨다면 기본 클래스 메소드를 호출하도록 하십시오.

기술문서 TOP으로 돌아가기