주의 사항:Photon TrueSync와 Thunder는 서비스 종료되었으며 앞으로도 업데이트 및 릴리즈는 없을 예정입니다. 기존 어플리케이션에 영향은 없습니다만 현재 개발중인 어플리케이션에 대해서는 마이그레이션을 장려합니다.

TrueSync Manager

A TrueSync-managed Session

Photon TrueSync is a multiplayer lockstep system, so all game code must be executed in discrete steps (we call them ticks) that are run in the same order in all client computers in the gameplay room.

To guarantee that the simulation will give the same result in all clients, this discrete simulation is controlled by a component named TrueSyncManager that must be present in the Unity scene that will host gameplay code and game objects.

To start a TrueSync managed lockstep session, just load a scene that contains a TrueSyncManager component attached to a game object.

If the scene is loaded while the client machine is connected and inside a Photon room, TrueSync will run in online lockstep with all clients in the same room. If not connected to Photon, TrueSync will run in offline mode, which is great for single player portions of the game, code for online and offline gameplay can easily be reused.

The TrueSyncManager Component

The Figure bellow shows a TrueSyncManager component in a game object inspector:

// image tsmngr

Player Prefabs

The collection Player Prefabs simplify the instantiation of player-controlled game objects.

// image player prefab

A Player Prefab is a normal Unity prefab, that will have an instance created by TrueSync for each player in the lockstep session (the Photon room).

For each player, there will be a copy of its player prefabs in each of the computers connected to the Photon room.

Player prefabs normally contain at least one TrueSyncBehaviour attached to them.

Back to top