Beispiel #1
0
 public LocalizationUnitHandle RequestUnitHandle(string path)
 {
     if (CurrentPack == null)
     {
         return(LocalizationUnitHandle.Default);
     }
     return(CurrentPack.RequestUnitHandle(path));
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="group">The name of the group.</param>
 /// <param name="unit">The name of the unit.</param>
 /// <returns>Matched handle. If no handles are matched, it returns empty handle. </returns>
 public LocalizationUnitHandle RequestUnitHandle(string group, string unit)
 {
     if (CurrentPack == null)
     {
         return(LocalizationUnitHandle.Default);
     }
     return(CurrentPack.RequestUnitHandle(group, unit));
 }
        public static string LoadString(string assetId)
        {
            string text = CurrentPack?.GetText(assetId) ?? "<null>";

            return(Application.isPlaying ? TextTemplateEngine.Process(text) : text);
        }