Hi, I modified the FOW system to not block when being initialized. We had to timeslice it because the initial CreateGrid() was taking too long and we need to show some sort of animated loading screen.
Basically what I did was:
1) turned the FOWSystem.Start method into a coroutine that yields several times during the CreateGrid() call. This new coroutine is still responsible for spawning the update thread.
2) added a 'm_initialized' that starts out as false and is set to true at the end of my coroutine. FOWSystem.Update() changed to return if m_initialized is false.
Now all this runs fine and dandy in the Editor but as soon as I run it on my ipad I get a crash when I load another scene:
http://screencast.com/t/Z5AbAu8WOHVz (within UpdateBuffer)
The crash happens at various times within FOWSystem.OnDestroy. Sometimes mThread.Abort() has been called but other times it hasn't been called yet.
Has anyone seen this before? Can the worker thread even be started by a coroutine? I tried moving the thread start to Update() but it didn't seem to make a difference.
Thanks very much,
Jeff