Exemplo n.º 1
0
        void OnEnable()
        {
            m_LanguageProp        = serializedObject.FindProperty("language");
            m_OriginalPhrasesProp = serializedObject.FindProperty("originalPhrases");
            m_PhrasesProp         = serializedObject.FindProperty("phrases");

            m_TranslatedPhrases = (TranslatedPhrases)target;

            if (m_OriginalPhrasesProp.objectReferenceValue != null)
            {
                OriginalPhrasesSetup();
            }
        }
Exemplo n.º 2
0
 public static void SetLanguage(TranslatedPhrases phrases)
 {
     for (int i = 0; i < Instance.phrases.Count; i++)
     {
         if (Instance.phrases[i] == phrases)
         {
             Instance.m_LanguageIndex = i;
             return;
         }
     }
     Instance.phrases.Add(phrases);
     Instance.m_LanguageIndex = Instance.phrases.Count - 1;
 }