Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class LocalizationInfo
- {
- public abstract LocalizationInfo(string[] lines)
- {
- }
- }
- private T LoadInfo<T>(string filename) where T : LocalizationInfo
- {
- // initiaize
- T info;
- // load asset
- var asset = LoadLocalizationAsset(filename);
- if (asset == null) return null;
- // get the (singular) id block
- string idBlock = GetIDBlocks(asset)[0];
- // split the block by lines
- string[] split = new string[] { "\n" };
- var lines = idBlock.Split(split, StringSplitOptions.RemoveEmptyEntries);
- info = new T(lines);
- return info;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement