public Application()
{
PlatformManager = new PlatformManager(CreateWxPlatformManager());
Engine = new Engine(PlatformManager);
Engine.Init();
// Search for the location of the main assets folder.
string assetsPath;
if (!SearchForAssetsDirectory(out assetsPath))
throw new Exception("Editor assets were not found");
Archive = new ArchiveVirtual();
Archive.MountDirectories(assetsPath, Allocator.GetHeap());
ResourceManager = Engine.ResourceManager;
ResourceManager.Archive = Archive;
NativeWindowManager = Engine.WindowManager;
RenderDevice = Engine.RenderDevice;
ModuleManager = new ModuleManager();
RemotingManager = new RemotingManager(ModuleManager);
ModuleManager.Init(RemotingManager.ServiceManager);
//Initiate global services
WindowManager = new Windows.WindowManager(this);
RemotingManager.ServiceManager.GetCreateImplementation<IWindowManager>(WindowManager);
// FIXME: Introduce a better system to get at global objects (dependency injection?)
RemotingManager.ServiceManager.Application = this;
}