Welcome, Guest
Username: Password: Remember me

TOPIC: Maximum Categories

Maximum Categories 7 months 2 weeks ago #2557

  • 71M
  • 71M's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Hi,

Is it possible to have more than 32 categories?
Looking at the code, I don't see how that's possible.

Cheers,
Tim
The administrator has disabled public write access.

Maximum Categories 7 months 2 weeks ago #2558

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1081
  • Thank you received: 231
  • Karma: 68
Hi,
I2 Localization doesn't constrain the number of categories you have. Categories are just extracted from the term's name (e.g. Tutorial/Title). So, there can be as many categories as terms.

Said that, the Term's list in the Language Source inspector, uses a unity GUI.MaskField which only allows 32bits. That breaks the filtering of terms in that list as soon as you have more than 32 categories.
However, if you filter by "everything", you can still have more than 32 categories. And ALL categories are shown as a popup tree when selecting terms in the Localize inspector. You just wont be able to filter in the Term's list, even thought all of the term will show the correct category tag.

I have a task to fix this issue with the MaskField (i.e. use my own custom Mask selection), but it seems that there is always a feature that takes priority. Now that Plurals are done, and I'm finishing the Extended Input Specialization, I will finally get to those smaller fixes!

Please, give your vote here to allow me prioritize it better:
trello.com/c/V3x0W7LP/8-allow-editing-more-than-32-categories
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.
The following user(s) said Thank You: 71M

Maximum Categories 7 months 2 weeks ago #2560

  • 71M
  • 71M's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Thank you for the quick response!

I'll bear that in mind when working with a large number of categories.
The administrator has disabled public write access.

Maximum Categories 3 months 3 weeks ago #2784

  • 71M
  • 71M's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
We started hitting the 32 category limit so I went ahead and modified the term filter code, might be useful to others.
void OnGUI_SelectedCategories()
{
	if ( mParsedCategories.Count == 0 )
		return;

	if ( GUILayout.Button( new GUIContent( "Filter" ), "toolbarbutton" ) )
	{
		var menu = new GenericMenu();

		menu.AddItem( new GUIContent( "Everything" ), false, () =>
		{
			mSelectedCategories.Clear();
			mSelectedCategories.AddRange( mParsedCategories );
			ScheduleUpdateTermsToShowInList();
		} );
		menu.AddItem( new GUIContent( "Nothing" ), false, () =>
		{
			mSelectedCategories.Clear();
			ScheduleUpdateTermsToShowInList();
		} );

		foreach ( var category in mParsedCategories )
		{
			menu.AddItem( new GUIContent( category ), mSelectedCategories.Contains( category ), () =>
			{
				if ( mSelectedCategories.Contains( category ) )
				{
					mSelectedCategories.Remove( category );
				}
				else
				{
					mSelectedCategories.Add( category );
				}
				ScheduleUpdateTermsToShowInList();
			} );
		}

		menu.ShowAsContext();
	}
}
The administrator has disabled public write access.

Maximum Categories 3 months 2 weeks ago #2786

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1081
  • Thank you received: 231
  • Karma: 68
Thanks a lot for looking into this!
I like your approach a lot, will add it to the next release!

Thanks!
Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.
Time to create page: 0.167 seconds
Colors