SnpM / LockstepFramework

Framework for lockstep RTS, TD, and MOBA games.
MIT License
1.41k stars 351 forks source link

Error when "Rewind" GUI button pressed. #108

Closed ashleyseric closed 8 years ago

ashleyseric commented 8 years ago

Hi, when I click the Rewind GUI button (after clicking save) in the example scene I get the following error:

ArgumentNullException: Argument cannot be null. Parameter name: value System.BitConverter.PutBytes (System.Byte* dst, System.Byte[] src, Int32 start_index, Int32 count) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/BitConverter.cs:170) System.BitConverter.ToInt32 (System.Byte[] value, Int32 startIndex) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/BitConverter.cs:228) Lockstep.Reader.ReadInt () (at Assets/LockstepFramework-Master/Core/Utility/Serialization/Reader.cs:69) Lockstep.ReplayManager.Deserialize (Lockstep.Reader reader) (at Assets/LockstepFramework-Master/Core/Game/Managers/ReplayManager.cs:94) Lockstep.ReplayManager+<StreamPlayback>c__IteratorA.MoveNext () (at Assets/LockstepFramework-Master/Core/Game/Managers/ReplayManager.cs:136) UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

It's coming from the sphere primitive object ( created in LockstepManager.Setup() ). As far as I can tell the database is initialized correctly as per the instructions.

I have been pouring over the code to figure out how to use the framework. I have successfully setup my own scene and my own units etc, but I am uncertain as to how to properly implement my own commands (such as creating a building or spawning a unit on demand etc).

Any help is much appreciated, I'm very excited about the project!

(My apologies if this is the wrong place to ask these questions it's my first github issue post).

SnpM commented 8 years ago

Thanks for catching this bug. Made some changes to the test replay UI and got it fixed.

SnpM commented 8 years ago

Thanks for catching this bug.