June 25, 20187 yr Hey @Droidz through my plugin, I want to add some states of my own (mostly for custom training etc). Unfortunately, when doing this OnEngineStart event, I always get: [E] 13:50:08 - Engine > Pulse(): System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at System.Collections.Generic.List`1.Enumerator.MoveNext() at robotManager.FiniteStateMachine.Engine.Pulse() which makes sense. Is there any way to add my own states, currently? I couldn't find any event that fires before EngineStart and I am sure I'm not modifying the collection DURING Pulse on another thread.
June 26, 20187 yr Hello, you use AddState ? robotManager.Events.FiniteStateMachineEvents.OnStartEngine += engine => { engine.AddState(MyState); };
Create an account or sign in to comment