Esempio n. 1
0
        public void Log(string message, LogType logType = LogType.Log)
        {
            var fullMessage = _richTextFactory
                              .UnstyledText(TitleBacked)
                              .UnstyledText(message).ToString();

            _richTextFactory.Clear();

            Debug.unityLogger.Log(logType, fullMessage);
        }
Esempio n. 2
0
        private Logger(string prefix, string title, Color titleColor, FontStyle titleStyle = FontStyle.Normal)
        {
            Title      = title;
            TitleColor = titleColor;
            TitleStyle = titleStyle;

            _richTextFactory = new RichTextFactory(2048);
            TitleBacked      = _richTextFactory
                               .UnstyledText(prefix)
                               .Style(TitleStyle).Color(TitleColor).Text(Title)
                               .ToString(true);
        }
Esempio n. 3
0
        private static IRoutineWorker GetSceneWorker()
        {
            if (!_routineSceneWorker || !_routineSceneWorker.gameObject)
            {
                _routineSceneWorker = GameObjectFactory.New()
                                      .SetName("[ROUTINE] SCENE WORKER")
                                      .AddComponent <RoutineWorker>()
                                      .Build <RoutineWorker>();

                var message = RichTextFactory.UnstyledText("Scene worker was created on scene: ")
                              .Default.Bold.Text(SceneManager.GetActiveScene().name).ToString(true);

                _routineSceneWorker.gameObject.hideFlags = HideFlags.HideInHierarchy;

                Logger.Log(message);
            }

            return(_routineSceneWorker);
        }