/// <summary>
        /// Returns the progress of simulation deserialization.
        /// Note: two threads at play here, old values of m_size might be cached for quite some time.
        /// </summary>
        public static int GetSimProgress()
        {
            try
            {
                FastList <LoadingProfiler.Event> events = ProfilerSource.GetEvents(LoadingManager.instance.m_loadingProfilerSimulation);
                return(Thread.VolatileRead(ref events.m_size));
            }
            catch (Exception) { }

            return(-1);
        }
Esempio n. 2
0
 internal static void Init()
 {
     Sink.builder.Length = 0;
     customAssetEvents = ProfilerSource.GetEvents(LoadingManager.instance.m_loadingProfilerCustomAsset);
     stopWatch.Reset();
 }