/// <summary> Returns the ComponentName for the passed NamesDatabaseType </summary> /// <param name="databaseType"></param> /// <exception cref="ArgumentOutOfRangeException"></exception> public static DoozyPath.ComponentName GetComponentName(NamesDatabaseType databaseType) { switch (databaseType) { case NamesDatabaseType.UIButton: return(DoozyPath.ComponentName.UIButton); case NamesDatabaseType.UICanvas: return(DoozyPath.ComponentName.UICanvas); case NamesDatabaseType.UIView: return(DoozyPath.ComponentName.UIView); case NamesDatabaseType.UIDrawer: return(DoozyPath.ComponentName.UIDrawer); default: throw new ArgumentOutOfRangeException(); } }
/// <summary> Returns the file name that will be used when creating a new ListOfNames asset file </summary> /// <param name="databaseType"> Database type that will use this list of name </param> /// <param name="categoryName"> Category name that this list of names will have </param> private static string GetDatabaseFileName(NamesDatabaseType databaseType, string categoryName) { return(databaseType + "_" + categoryName.Replace(" ", string.Empty)); }
/// <summary> Returns the default resources path for the given database type </summary> /// <param name="databaseType"> Database type </param> /// <exception cref="ArgumentOutOfRangeException"></exception> public static string GetPath(NamesDatabaseType databaseType) { return(DoozyPath.GetDataPath(GetComponentName(databaseType))); }