Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load back the Frame. #256

Open
ahmetson opened this issue Sep 28, 2024 · 0 comments
Open

Can't load back the Frame. #256

ahmetson opened this issue Sep 28, 2024 · 0 comments

Comments

@ahmetson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant