Beispiel #1
0
        /// <summary>Only loads the session settings.</summary>
        void Awake()
        {
            UnityEngine.Object.DontDestroyOnLoad(gameObject);

            // Read the configs for all the aggregators.
            ConfigAccessor.ReadFieldsInType(typeof(LogInterceptor), null /* instance */);
            ConfigAccessor.ReadFieldsInType(typeof(LogFilter), null /* instance */);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.diskLogAggregator.GetType(), ConsoleUI.diskLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.rawLogAggregator.GetType(), ConsoleUI.rawLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.collapseLogAggregator.GetType(), ConsoleUI.collapseLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.smartLogAggregator.GetType(), ConsoleUI.smartLogAggregator);

            // Start all aggregators.
            ConsoleUI.rawLogAggregator.StartCapture();
            ConsoleUI.collapseLogAggregator.StartCapture();
            ConsoleUI.smartLogAggregator.StartCapture();
            ConsoleUI.diskLogAggregator.StartCapture();
            LogInterceptor.StartIntercepting();

            // Load UI configs.
            ConfigAccessor.ReadFieldsInType(typeof(ConsoleUI), null /* instance */);
            ConfigAccessor.ReadFieldsInType(
                typeof(ConsoleUI), this, group: StdPersistentGroups.SessionGroup);
        }
Beispiel #2
0
        void Awake()
        {
            // Read all configs.
            ConfigAccessor.ReadFieldsInType(typeof(ConsoleUI), null /* instance */);
            ConfigAccessor.ReadFieldsInType(typeof(LogInterceptor), null /* instance */);
            ConfigAccessor.ReadFieldsInType(typeof(LogFilter), null /* instance */);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.diskLogAggregator.GetType(), ConsoleUI.diskLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.rawLogAggregator.GetType(), ConsoleUI.rawLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.collapseLogAggregator.GetType(), ConsoleUI.collapseLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.smartLogAggregator.GetType(), ConsoleUI.smartLogAggregator);

            // Start all aggregators.
            ConsoleUI.rawLogAggregator.StartCapture();
            ConsoleUI.collapseLogAggregator.StartCapture();
            ConsoleUI.smartLogAggregator.StartCapture();
            ConsoleUI.diskLogAggregator.StartCapture();
            LogInterceptor.StartIntercepting();
        }