DebugCategory CreateCategory(string categoryTitle) { DebugCategory category = new DebugCategory(categoryTitle, categoryColours[debugCategories.Count.Wrap(0, categoryColours.Length)]); debugCategories.Add(category); return(category); }
public static void Log(object a_objLog, int a_iColor = 0, DebugCategory a_eCategory = DebugCategory.ALL) { //if (!(a_iColor == 8)) // return; //#if UNITY_EDITOR || SHOWCONSOLE //if (CDebugSettings.Instance != null && CDebugSettings.Instance.RunningForPCBuild == true) //{ // System.IO.File.AppendAllText ("BUILDLOG.txt", a_objLog.ToString() + " ==> \n"); //} if (Category != DebugCategory.ALL && Category != a_eCategory) // { return; } if (a_iColor < 0 || a_iColor > colors.Length) { a_iColor = 0; } string myColor = colors[a_iColor]; a_objLog = "<color=#" + myColor + ">" + "<b>" + a_objLog + "</b>" + "</color>"; Debug.Log(a_objLog); //#else //Debug.Log("ProCricket2015 : " + a_objLog.ToString()); //#endif }
public DebugCategoryInfo GetDebugCategoryInfo( DebugCategory cat) { if (m_categoryToDebugContainer != null && m_categoryToDebugContainer.ContainsKey(cat)) { return(m_categoryToDebugContainer[cat]); } return(null); }
void DrawCategories() { GUILayout.BeginArea(new Rect(0, 0, Screen.width, _DebugMainHeight), menuSkin.box); GUILayout.BeginHorizontal(); foreach (DebugCategory category in debugCategories) { if (category.OnGUI_DrawCategory()) { activeCategory = category; } } GUILayout.EndHorizontal(); GUILayout.EndArea(); }
public bool ShowingCategory(DebugCategory cat, bool requireDebugWindowVisible = true) { if (!ShowDebugGUI && requireDebugWindowVisible) { return(false); } DebugCategoryInfo debugCategoryInfo = GetDebugCategoryInfo(cat); if (debugCategoryInfo != null) { return(debugCategoryInfo.m_enabled); } return(false); }
void OnGUI() { GUI.skin = menuSkin; DrawCategories(); if (activeCategory != null) { if (!activeCategory.OnGUI_DrawDropDownMenu()) { activeCategory = null; } } DrawDebugStats(); }
public static void AddDebugButton(string categoryTitle, string name, Action action = null, Func <bool> isEnabled = null) { if (Instance == null) { return; } DebugCategory category = Instance.GetCategory(categoryTitle); if (category == null) { category = Instance.CreateCategory(categoryTitle); } category.AddDebugItem(new DebugButton(name, action, isEnabled)); }
public override int GetHashCode() { int hash = 1; if (StoryQuestId != 0UL) { hash ^= StoryQuestId.GetHashCode(); } if (QuestNameId.Length != 0) { hash ^= QuestNameId.GetHashCode(); } if (FieldId != 0UL) { hash ^= FieldId.GetHashCode(); } if (RequiredConditionId != 0L) { hash ^= RequiredConditionId.GetHashCode(); } if (SortBy != 0UL) { hash ^= SortBy.GetHashCode(); } if (AreaSpotId != 0UL) { hash ^= AreaSpotId.GetHashCode(); } if (ItemSetId != 0UL) { hash ^= ItemSetId.GetHashCode(); } if (QuestGroupId != 0UL) { hash ^= QuestGroupId.GetHashCode(); } if (FieldType != 0) { hash ^= FieldType.GetHashCode(); } if (ScheduleId.Length != 0) { hash ^= ScheduleId.GetHashCode(); } if (PlayCountLimit != 0L) { hash ^= PlayCountLimit.GetHashCode(); } if (ChapterOpenAnimation != false) { hash ^= ChapterOpenAnimation.GetHashCode(); } if (Difficulty != 0) { hash ^= Difficulty.GetHashCode(); } if (WeekScheduleKeyword.Length != 0) { hash ^= WeekScheduleKeyword.GetHashCode(); } if (Debug != false) { hash ^= Debug.GetHashCode(); } if (DebugCategory != 0L) { hash ^= DebugCategory.GetHashCode(); } if (RewardType != 0) { hash ^= RewardType.GetHashCode(); } if (ShowcasedItemId != 0L) { hash ^= ShowcasedItemId.GetHashCode(); } if (CharaQuestListItemId != 0L) { hash ^= CharaQuestListItemId.GetHashCode(); } if (IsEvolutionQuest != false) { hash ^= IsEvolutionQuest.GetHashCode(); } if (QuestType != 0) { hash ^= QuestType.GetHashCode(); } if (IsSearchQuest != false) { hash ^= IsSearchQuest.GetHashCode(); } if (NextQuestId != 0UL) { hash ^= NextQuestId.GetHashCode(); } if (U24 != 0UL) { hash ^= U24.GetHashCode(); } if (U25 != 0UL) { hash ^= U25.GetHashCode(); } if (U26 != 0UL) { hash ^= U26.GetHashCode(); } if (U27 != 0UL) { hash ^= U27.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public CustomPropertyDescriptor(string propertyName, DebugCategory category, TProperty value) : base(propertyName, new Attribute[] { new DebugCategoryAttribute(category) }) { this.value = value; }
// Add tabs; these are not printed, but are used for the sorting public DebugCategoryAttribute(DebugCategory order) : base(order.ToString().PadLeft(typeof(DebugCategory).GetEnumNames().Length - (int)order + order.ToString().Length, '\t')) { }