public static string[] FindNameOfWidgetById(int widgetId) { UIWidgetTable uIWidgetTable = DataReader <UIWidgetTable> .Get(widgetId); if (uIWidgetTable != null && !string.IsNullOrEmpty(uIWidgetTable.widgetName)) { return(uIWidgetTable.widgetName.Split(";".ToCharArray())); } return(null); }
public static string FindNameOfUIByWidget(int widgetId) { UIWidgetTable uIWidgetTable = DataReader <UIWidgetTable> .Get(widgetId); if (uIWidgetTable != null) { if (uIWidgetTable.uiId > 0) { return(WidgetSystem.FindNameOfUIById(uIWidgetTable.uiId)); } Debug.LogError("GameData.UIWidgetTable no uiId, widgetId = " + widgetId); } return(string.Empty); }
public static int GetAudioId(string uiName, string widgetName) { int result = -1; for (int i = 0; i < AudioIdManager.Audio2UIs.get_Count(); i++) { Audio2UI audio2UI = AudioIdManager.Audio2UIs.get_Item(i); if (!string.IsNullOrEmpty(uiName) && audio2UI.widgetId > 0) { UIWidgetTable uIWidgetTable = DataReader <UIWidgetTable> .Get(audio2UI.widgetId); if (uIWidgetTable != null) { UINameTable uINameTable = DataReader <UINameTable> .Get(uIWidgetTable.uiId); if (uINameTable != null && uINameTable.name.Equals(uiName) && uIWidgetTable.widgetName.Equals(widgetName)) { result = audio2UI.audioId; } } } } return(result); }