Exemplo n.º 1
0
    protected bool BuildLanguage(LocalizationFontConfig.LanguageConfig langConfig)
    {
        Debug.Log("Localization: " + langConfig._languageName + " build begin...");

        if (!CheckLanguage(langConfig))
        {
            Debug.LogWarning("Localization: " + langConfig._languageName + " config is not valid!");

            return(false);
        }

        for (int j = 0; j < langConfig._fonts.Length; j++)
        {
            bool ret = BuildFont(langConfig._languageName, langConfig._charSetFile, langConfig._fonts[j]);

            if (!ret)
            {
                return(false);
            }
        }

        Debug.Log("Localization: " + langConfig._languageName + " build end...");

        return(true);
    }
Exemplo n.º 2
0
    protected bool CheckLanguage(LocalizationFontConfig.LanguageConfig langConfig)
    {
        if (langConfig._languageName == "")
        {
            EditorUtility.DisplayDialog("Fonts Maker", "Language Name Can't be empty!", "OK");

            Debug.LogWarning("Localization: langConfig._languageName == null");

            return(false);
        }

//		if (langConfig._charSetFile == null)
//		{
//			EditorUtility.DisplayDialog("Fonts Maker", "Char set file Can't be null!", "OK");
//
//			Debug.LogWarning("Localization: langConfig._charSetFile == null");
//
//			return false;
//		}

        if (langConfig._fonts.Length == 0)
        {
            EditorUtility.DisplayDialog("Fonts Maker", langConfig._languageName + " has no font to make!", "OK");

            Debug.LogWarning("Localization: langConfig._fonts.Length == 0");

            return(false);
        }

        return(true);
    }