Best practices - DLC for Chapters and Language
7 years 10 months ago #2021
by ckrin
Best practices - DLC for Chapters and Language was created by ckrin
Hello!
First things first: great asset we used it in various projects with great success!
We're currently developing an audio driven rpg game for mobile devices and l2 localization seems perfect for that.
To keep the app size as low as possible we planned to only include the main menu in the base app, and download all chapters according to the players language afterwards.
Example:
Question: What would be the best practice to do that? Are Assetbundles the way to go? How to organize the Language Source?
All the best,
Jan
First things first: great asset we used it in various projects with great success!
We're currently developing an audio driven rpg game for mobile devices and l2 localization seems perfect for that.
To keep the app size as low as possible we planned to only include the main menu in the base app, and download all chapters according to the players language afterwards.
- Main Menu
- Chapter One
- ----> Language One (english)
- ----> Language Two (spanish)
- ----> Language Three (german)
- Chapter Two
- ----> Language One (english)
- ----> Language Two (spanish)
- ----> Language Three (german)
- Chapter ...
- ----> Language ...
Example:
- Player installs app.
- Player choose language two (spanish)
- Player downloads all chapters of the game in language two
Question: What would be the best practice to do that? Are Assetbundles the way to go? How to organize the Language Source?
All the best,
Jan
Please Log in or Create an account to join the conversation.
7 years 10 months ago #2027
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Best practices - DLC for Chapters and Language
In I2L, there are two types of language source: Global Sources and Local Sources
Global Sources are loaded automatically by the plugin and are can be accessed from any scene. The best example of this is the I2Languages.prefab.
To create other Global Sources, you have to duplicate the I2Languages.prefab (or a create a new gameobject, add a LanguageSource component and save that as a prefab), then you have to tell I2L that prefab should be loaded at startup. Which you do by adding the name of the prefab to the GlobalSources array in the LocalizationManager.cs line 207Global Sources, need to included in the Build
On the hand, Local Sources, are part of the Scenes (created by adding a LanguageSource component to any of your Scene Objects, but not creating a prefab out of it). An example of Local sources are the sources included in each Example Scene in I2L.
These sources, are only accessible while the scene is loaded, and its meant to be localization that will be used only in that scene. I'm using Local Sources in the Example Scenes, as that allows me to have separated translations for each scene and changing one doesn't affect the other.
Because of this, they are great for AssetBundles. Just add a LanguageSource component to any scene in your bundle and the translations will be available for that scene.
Alternatively, you can create an scene just for the LanguageSource, and load it additively whenever you use the content from the AssetBundle.
If you don't like handling the sources inside Scenes, another alternative is to have the source as a prefab in the bundle, and then, once you download the bundle, call LocalizationManager.AddSource( source )
Hope that helps,
Frank
Global Sources are loaded automatically by the plugin and are can be accessed from any scene. The best example of this is the I2Languages.prefab.
To create other Global Sources, you have to duplicate the I2Languages.prefab (or a create a new gameobject, add a LanguageSource component and save that as a prefab), then you have to tell I2L that prefab should be loaded at startup. Which you do by adding the name of the prefab to the GlobalSources array in the LocalizationManager.cs line 207
public static string[] GlobalSources = new string[]{"I2Languages", "MyNewSource"};
On the hand, Local Sources, are part of the Scenes (created by adding a LanguageSource component to any of your Scene Objects, but not creating a prefab out of it). An example of Local sources are the sources included in each Example Scene in I2L.
These sources, are only accessible while the scene is loaded, and its meant to be localization that will be used only in that scene. I'm using Local Sources in the Example Scenes, as that allows me to have separated translations for each scene and changing one doesn't affect the other.
Because of this, they are great for AssetBundles. Just add a LanguageSource component to any scene in your bundle and the translations will be available for that scene.
Alternatively, you can create an scene just for the LanguageSource, and load it additively whenever you use the content from the AssetBundle.
If you don't like handling the sources inside Scenes, another alternative is to have the source as a prefab in the bundle, and then, once you download the bundle, call LocalizationManager.AddSource( source )
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.143 seconds