コード例 #1
0
    public override void OnGameAwake()
    {
        base.OnGameAwake();

        SimSerializationOperation.BlobAssetDataCollectors[typeof(PhysicsColliderBlob)]     = new BlobPhysicsColliderCollector();
        SimDeserializationOperation.BlobAssetDataDistributors[typeof(PhysicsColliderBlob)] = new BlobPhysicsColliderDistributor();

        Time.fixedDeltaTime = (float)SimulationConstants.TIME_STEP;

        World.DefaultGameObjectInjectionWorld
        .GetOrCreateSystem <SimulationControlSystemGroup>()
        .Initialize(OnlineService.OnlineInterface?.SessionInterface, ValidateSimInput);

        _tickSystem = World.DefaultGameObjectInjectionWorld.GetExistingSystem <TickSimulationSystem>();
        _tickSystem.PauseSimulation("game-not-ready");
        _tickSystem.SimulationTicked += OnSimulationTicked;
    }