Ho to access a group of text
- KimAndersenGF
- Topic Author
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
7 years 8 months ago #2180
by KimAndersenGF
Ho to access a group of text was created by KimAndersenGF
Hi there;
Great Asset!
I am working on a game with a group of text that i need to access.
I have made the entry in the database with a "MyGroup/myEntry1" and i know how to retrieve a single entry.
But i need to run through all the items in the group. I am using c#.
It should go like this:
int theCountOfTheList = I2.Loc.ScriptLocalizaton.Get("MyGroup").Length; //But nothing returns.
And then i have to run through the group with a simple loop...
Can you help?
Regards Kim Andersen
Great Asset!
I am working on a game with a group of text that i need to access.
I have made the entry in the database with a "MyGroup/myEntry1" and i know how to retrieve a single entry.
But i need to run through all the items in the group. I am using c#.
It should go like this:
int theCountOfTheList = I2.Loc.ScriptLocalizaton.Get("MyGroup").Length; //But nothing returns.
And then i have to run through the group with a simple loop...
Can you help?
Regards Kim Andersen
Please Log in or Create an account to join the conversation.
7 years 8 months ago #2181
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Ho to access a group of text
Hi,
You can use the function LocalizationManager.GetTermsList to get all terms belonging to a category:
Hope that helps,
Frank
You can use the function LocalizationManager.GetTermsList to get all terms belonging to a category:
List<string> terms = I2.Loc.LocalizationManager.GetTermsList("MyGroup");
int theCountOfTheList = terms.Count;
foreach (var term in terms)
Debug.Log( term );
Hope that helps,
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
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds