Skip to content

Can't load back the Frame. #256

@ahmetson

Description

@ahmetson

The GameSimulation.FromBytes throws error.

The ToBytes method creates a native byte array. Then as the frame sync needed, the game will call the FromBytes.

How to reproduce? For testing purpose, replace the GGPORunner's constructor with the following code snipped:

   LogGame("GGPOGame Created");
   Name = name;
   GGPO.SetLogDelegate(LogPlugin);
   Game = game;
   var bytes = Game.ToBytes();
   Game.FromBytes(bytes);
   UnityEngine.Debug.LogError("ToBytes -> FromBytes worked");
   LogPlugin("GameState Set " + Game);
   GameInfo = new GameInfo();
   perf = perfPanel;

Here var bytes = Game.ToBytes() followed by Game.FromBytes(bytes) are only two lines of code added by us.
However, this error will occur when GGPO library invokes LoadFrame callback as well.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions