LanguageSource location?
9 years 1 month ago #1096
by yuewah
LanguageSource location? was created by yuewah
In latest version, LanguageSource can be either in resources folder or scene, can it be placed in other location that is loaded using AssetDatabase.LoadAssetAtPath
Therefore, the LanguageSource will not be included in the final built and having the editor feature.
Therefore, the LanguageSource will not be included in the final built and having the editor feature.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #1097
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic LanguageSource location?
Hi,
As you said, LanguageSources can be placed in the Resource folder and as far as they are in the LocalizationManager.GlobalLanguageSources array, they will be loaded.
LanguageSources can also be placed in the Scene, and as far as they are instantiated, they will add them self to the LocalizationManager.
However, if you manually use AssetDatabase.LoadAssetAtPath, to load a source, then you have to call
LocalizationManager.AddSource( source ) so that it get used and initialized. And given that AssetDatabase is an Editor only class, that will only work when in the Editor and the LanguageSource will not be included in the build as its not referenced.
Hope that helps,
Frank
As you said, LanguageSources can be placed in the Resource folder and as far as they are in the LocalizationManager.GlobalLanguageSources array, they will be loaded.
LanguageSources can also be placed in the Scene, and as far as they are instantiated, they will add them self to the LocalizationManager.
However, if you manually use AssetDatabase.LoadAssetAtPath, to load a source, then you have to call
LocalizationManager.AddSource( source ) so that it get used and initialized. And given that AssetDatabase is an Editor only class, that will only work when in the Editor and the LanguageSource will not be included in the build as its not referenced.
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.123 seconds