LanguagePluginAndroid.cs 771 B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. namespace SC.XR.Unity.Module_DetectorSystem
  3. {
  4. public class LanguagePluginAndroid : LanguagePlugin
  5. {
  6. public static LanguagePluginAndroid Create()
  7. {
  8. return new LanguagePluginAndroid();
  9. }
  10. private AndroidJavaObject LanguagePluginAndroidObject;
  11. LanguagePluginAndroid()
  12. {
  13. if (Application.platform == RuntimePlatform.Android)
  14. {
  15. LanguagePluginAndroidObject = new AndroidJavaObject("com.xr.language.LangSys", AndroidPluginBase.CurrentActivity);
  16. }
  17. }
  18. public override SCLanguageEnum GetSystemLanguage()
  19. {
  20. return (SCLanguageEnum)LanguagePluginAndroidObject.Call<int>("getLanType");
  21. }
  22. }
  23. }