コード例 #1
0
ファイル: ModuleManager.cs プロジェクト: wensincai/Unity5.4
        private static void RegisterPlatformSupportModules()
        {
            if (ModuleManager.s_PlatformModules != null)
            {
                Console.WriteLine("Modules already registered, not loading");
                return;
            }
            Console.WriteLine("Registering platform support modules:");
            Stopwatch stopwatch = Stopwatch.StartNew();

            ModuleManager.s_PlatformModules = ModuleManager.RegisterModulesFromLoadedAssemblies <IPlatformSupportModule>(new Func <Assembly, IEnumerable <IPlatformSupportModule> >(ModuleManager.RegisterPlatformSupportModulesFromAssembly)).ToList <IPlatformSupportModule>();
            stopwatch.Stop();
            Console.WriteLine("Registered platform support modules in: " + stopwatch.Elapsed.TotalSeconds + "s.");
        }