As we go forward, migrations are going to likely become more complex,
requiring access to more components and also at a point in time where
they are ready.
In the upcoming case, `DialogOverlay` and `Audio` are important. Access
to `Audio` is a killer as migrations were run before the `GameHost` has
a chance to initialise it.
---------
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
Resolves an issue I've been able to locally reproduce on windows.
Basically, the `File.Copy` would begin while realm was blocking. The
"restore" operation is posted to the `SynchronizationContext` to run on
next update call, but in the mean time the copy would begin, causing a
conflict of interest.
Very dangerous. Only really noticeable on windows.
Using `Environment.CurrentDirectory` for storing / reading files is dangerous as the current directory is mutable and can be changed when performing a certain operation (like opening solutions in roslyn type reference builder for example).