PUN Classic (v1), PUN 2, Bolt는 휴업 모드입니다. Unity2022에 대해서는 PUN 2에서 서포트하지만, 신기능의 추가는 없습니다. 현재 이용중인 고객님의 PUN 및 Bolt 프로젝트는 중단되지 않고, 퍼포먼스나 성능이 떨어지는 일도 없습니다. 앞으로의 새로운 프로젝트에는 Photon Fusion 또는 Quantum을 사용해 주십시오.

대안이 되는 SimulateController / ExecuteCommand

Bolt 내에서 executecommand "남용"

일반적으로 FPS 또는 TPS의 신뢰성있는 클라이언트-측 예측 이동의 유형을 수행하기 위해서 ExecuteCommand() & SimulateController() 를 사용합니다. 이것은 기본적으로 "resetState" 를 무시하고 "도착" 대상으로 사용할 수 있습니다.

C#

    public override void SimulateController() {
    IMyVehicleCommandInput input = MyVehicleCommand.Create();

    input.Throttle = ...
    input.Gear = ...
    input.Blah = ...;

    entity.QueueInput(input);
    
    }
    
    MyVehicleCommand serverResult;

    public override void ExecuteCommand(Bolt.Command command, bool resetState) {
        MyVehicleCommand cmd = (MyVehicleCommand)command;
    
        // resetState means we got a state update from the server, this will only be true on the client
        if (resetState) {
            serverResult = cmd;
        }
    
        if (serverResult != null) {
            // if we have a server result, this is the last "verified" 
            // result from the server, the data will be available in 
            // cmd.Result and is specified by you on the Command asset.
            // this is your lerp target
        }


            // perform movement logic for player, this code execute on both client (controlling) and server
    }
}
Back to top