private LogErrorChannel ( UnityEngine context, string channel, string message ) : void | ||
context | UnityEngine | |
channel | string | |
message | string | |
return | void |
private void reloadCardList() { BuildCardList.clearItems(); foreach (CardDefine card in cards.Where( c => ui.getManager <CardManager>().isStandardCard(c) ) ) { if (parent.game.cards.tryGetSkin(card.id, out var skin)) { if (FilterPanel.cardFilter(card, skin)) { var item = BuildCardList.addItem(); item.update(card, skin); } } else { UberDebug.LogErrorChannel("UI", "无法找到" + card + "的皮肤"); } BuildCardList.sortItems(FilterPanel.sortCompareMethod); } }
/// <summary> /// Extract the first maxMessages messages from stackdriverEntries into stackdriverEntriesInFlight /// </summary> private static void extractStackdriverEntries(StackdriverEntries stackdriverEntries, StackdriverEntries stackdriverEntriesInFlight, int maxMessages) { if (stackdriverEntriesInFlight.entries.Count > 0) { UberDebug.LogErrorChannel(StackdriverChannel, "Attempted to extract a new set of messages while the previous set already was in-flight"); stackdriverEntriesInFlight.entries.Clear(); } int messageExtractCount = Math.Min(stackdriverEntries.entries.Count, maxMessages); stackdriverEntriesInFlight.entries.AddRange(stackdriverEntries.entries.GetRange(0, messageExtractCount)); stackdriverEntries.entries.RemoveRange(0, messageExtractCount); }
/// <summary> /// 创建一张手牌 /// </summary> /// <param name="card"></param> /// <param name="position">默认为-1也就是最右手</param> /// <returns></returns> public HandListItem createHand(TouhouCardEngine.Card card, int position = -1) { if (cardHandDic.ContainsKey(card)) { if (cardHandDic[card] != null) { UberDebug.LogErrorChannel("UI", "手牌中已经存在" + card + "对应UI" + cardHandDic[card]); return(cardHandDic[card]); } else { cardHandDic[card] = null; } } UberDebug.LogChannel("UI", "创建手牌UI:" + card); HandListItem item; if (card.getOwner() == player) { item = ui.SelfHandList.addItem(); if (position >= 0) { ui.SelfHandList.defaultItem.rectTransform.SetAsFirstSibling(); item.rectTransform.SetSiblingIndex(position + 1); } item.isDragable = true; setCard(item.Card, card, true); } else { item = ui.EnemyHandList.addItem(); if (position >= 0) { ui.EnemyHandList.defaultItem.rectTransform.SetAsFirstSibling(); item.rectTransform.SetSiblingIndex(position + 1); } item.isDragable = false; setCard(item.Card, card, false); } item.gameObject.name = card.ToString(); item.onDrag.set(onDragHand); item.onEndDrag.set(onDragHandEnd); cardHandDic.Add(card, item); return(item); }
private void Update() { if (gameTask != null) { if (gameTask.IsCanceled || gameTask.IsFaulted) { if (gameTask.Exception != null) { UberDebug.LogErrorChannel("Game", "游戏因异常退出:" + gameTask.Exception); } else { UberDebug.LogErrorChannel("Game", "游戏因未知异常退出"); } quitGame(); } } }
public void logError(string channel, string msg) { if (!enable) { return; } if (blackList.Contains(channel)) { return; } if (string.IsNullOrEmpty(channel)) { UberDebug.LogError((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg); } else { UberDebug.LogErrorChannel(channel, (string.IsNullOrEmpty(name) ? null : (name + ":")) + msg); } }
// Use this for initialization void Start() { Debug.Log("Standard log operation"); UberDebug.LogChannel(LogChannels.TestChannel1, "Log message to TestChannel1"); UberDebug.LogChannel(LogChannels.TestChannel2, "Log message to TestChannel2"); UberDebug.LogChannel(LogChannels.TestChannel3, "Log message to TestChannel3"); UberDebug.LogChannel(LogChannels.TestChannel4, "Log message to TestChannel4"); UberDebug.LogChannel(LogChannels.TestChannel5, "Log message to TestChannel5"); UberDebug.LogWarningChannel(LogChannels.TestChannel1, "Log warning to TestChannel1"); UberDebug.LogWarningChannel(LogChannels.TestChannel2, "Log warning to TestChannel2"); UberDebug.LogWarningChannel(LogChannels.TestChannel3, "Log warning to TestChannel3"); UberDebug.LogWarningChannel(LogChannels.TestChannel4, "Log warning to TestChannel4"); UberDebug.LogWarningChannel(LogChannels.TestChannel5, "Log warning to TestChannel5"); UberDebug.LogErrorChannel(LogChannels.TestChannel1, "Log error to TestChannel1"); UberDebug.LogErrorChannel(LogChannels.TestChannel2, "Log error to TestChannel2"); UberDebug.LogErrorChannel(LogChannels.TestChannel3, "Log error to TestChannel3"); UberDebug.LogErrorChannel(LogChannels.TestChannel4, "Log error to TestChannel4"); UberDebug.LogErrorChannel(LogChannels.TestChannel5, "Log error to TestChannel5"); }
public void DoTest() { // UnityEngine.Debug.Log("Starting"); Debug.LogWarning("Log Warning with GameObject", gameObject); Debug.LogError("Log Error with GameObject", gameObject); Debug.Log("Log Message with GameObject", gameObject); Debug.LogFormat("Log Format param {0}", "Test"); Debug.LogFormat(gameObject, "Log Format with GameObject and param {0}", "Test"); UberDebug.Log("ULog"); UberDebug.Log("ULog with param {0}", "Test"); UberDebug.Log(gameObject, "ULog with GameObject"); UberDebug.Log(gameObject, "ULog with GameObject and param {0}", "Test"); UberDebug.LogChannel("Test", "ULogChannel"); UberDebug.LogChannel("Test", "ULogChannel with param {0}", "Test"); UberDebug.LogChannel(gameObject, "Test", "ULogChannel with GameObject"); UberDebug.LogChannel(gameObject, "Test", "ULogChannel with GameObject and param {0}", "Test"); UberDebug.LogWarning("ULogWarning"); UberDebug.LogWarning("ULogWarning with param {0}", "Test"); UberDebug.LogWarning(gameObject, "ULogWarning with GameObject"); UberDebug.LogWarning(gameObject, "ULogWarning with GameObject and param {0}", "Test"); UberDebug.LogWarningChannel("Test", "ULogWarningChannel"); UberDebug.LogWarningChannel("Test", "ULogWarningChannel with param {0}", "Test"); UberDebug.LogWarningChannel(gameObject, "Test", "ULogWarningChannel with GameObject"); UberDebug.LogWarningChannel(gameObject, "Test", "ULogWarningChannel with GameObject and param {0}", "Test"); UberDebug.LogError("ULogError"); UberDebug.LogError("ULogError with param {0}", "Test"); UberDebug.LogError(gameObject, "ULogError with GameObject"); UberDebug.LogError(gameObject, "ULogError with GameObject and param {0}", "Test"); UberDebug.LogErrorChannel("Test", "ULogErrorChannel"); UberDebug.LogErrorChannel("Test", "ULogErrorChannel with param {0}", "Test"); UberDebug.LogErrorChannel(gameObject, "Test", "ULogErrorChannel with GameObject"); UberDebug.LogErrorChannel(gameObject, "Test", "ULogErrorChannel with GameObject and param {0}", "Test"); }
public static void logErrorChannel(string channel, string message, params object[] par) { UberDebug.LogErrorChannel(channel, preprocessMessage(message), par); }
public static void logErrorChannel(UnityEngine.Object context, string channel, string message, params object[] par) { UberDebug.LogErrorChannel(context, channel, preprocessMessage(message), par); }
public static void Error(string message, UnityEngine.Object context = null) { UberDebug.LogErrorChannel("Frontend", message, context); }