Possibility to have access to an enum with term ids
5 years 1 week ago #4008
by cgascons
Possibility to have access to an enum with term ids was created by cgascons
Hi!
Just downloaded this asset from the Store, kudos to the team by the way, so far so good!
I'd like to know though if it's possible to access an enum with the term ids, something similar to what we have when we create a Localize Dropdown script in a component.
We basically need to assign to each of our item definitions a Term ID for the name and for its description. Each of these definitions are scriptable objects, we should be able to select a Term ID from a Dropdown on the inspector, making sure this way we don't make any typos.
Is this possible? I'm sorry beforehand if I missed this information in the Documentation, I've tried to make sure to read it a couple of times but I can't seem to find anything related.
Thanks!
Just downloaded this asset from the Store, kudos to the team by the way, so far so good!
I'd like to know though if it's possible to access an enum with the term ids, something similar to what we have when we create a Localize Dropdown script in a component.
We basically need to assign to each of our item definitions a Term ID for the name and for its description. Each of these definitions are scriptable objects, we should be able to select a Term ID from a Dropdown on the inspector, making sure this way we don't make any typos.
Is this possible? I'm sorry beforehand if I missed this information in the Documentation, I've tried to make sure to read it a couple of times but I can't seem to find anything related.
Thanks!
Please Log in or Create an account to join the conversation.
5 years 1 week ago #4009
by cgascons
Replied by cgascons on topic Possibility to have access to an enum with term ids
Nevermind, just found the solution myself. In case anybody runs into the same question in the future, using "LocalizedString" worked for me.
Thanks again!
Thanks again!
Please Log in or Create an account to join the conversation.
5 years 1 week ago #4010
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Possibility to have access to an enum with term ids
Hi,
Aside LocalizedStrings there are a couple more ways to avoid typos in the scripts:
1- Baking terms into scripts
inter-illusion.com/assets/I2Localization...riptsforsaferac.html
2- Using the attribute [TermsPopup] to convert the string inspector into a term's dropdown list.
e.g. [TermsPopup] public string MyTerm;
Hope that helps,
Frank
Aside LocalizedStrings there are a couple more ways to avoid typos in the scripts:
1- Baking terms into scripts
inter-illusion.com/assets/I2Localization...riptsforsaferac.html
2- Using the attribute [TermsPopup] to convert the string inspector into a term's dropdown list.
e.g. [TermsPopup] public string MyTerm;
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.
5 years 1 week ago - 5 years 1 week ago #4011
by cgascons
Replied by cgascons on topic Possibility to have access to an enum with term ids
Hi Frank, this does indeed help, thanks for the tips!
I'm already using baked terms for my in-game code but for the inspector I'm now wondering whether to use the TermsPopup solution you provided or not.
I was happy using the "LocalizedStrings" solution but now you made me doubt on which one is the best to use (efficiency speaking).
I understand that my current solution already returns the string localized, while the TermsPopup would only return the TermId which I would have to localize manually, right? I've noticed that, since I'm serializing all this data, perhaps the TermsPopup solution is better since it's only storing the TermId, while the LocalizedString stores more info such as: mRTL_IgnoreArabicFix, mRTL_MaxLineLength, etc...
Also, as a side note, I'm noticing that the LocalizedString attribute displays something funky at the right of the component (while the TermsPopup doesn't) is this intended? I have attached a screenshot.
Thanks!
I'm already using baked terms for my in-game code but for the inspector I'm now wondering whether to use the TermsPopup solution you provided or not.
I was happy using the "LocalizedStrings" solution but now you made me doubt on which one is the best to use (efficiency speaking).
I understand that my current solution already returns the string localized, while the TermsPopup would only return the TermId which I would have to localize manually, right? I've noticed that, since I'm serializing all this data, perhaps the TermsPopup solution is better since it's only storing the TermId, while the LocalizedString stores more info such as: mRTL_IgnoreArabicFix, mRTL_MaxLineLength, etc...
Also, as a side note, I'm noticing that the LocalizedString attribute displays something funky at the right of the component (while the TermsPopup doesn't) is this intended? I have attached a screenshot.
Thanks!
Last edit: 5 years 1 week ago by cgascons.
Please Log in or Create an account to join the conversation.
Time to create page: 0.145 seconds