예제 #1
0
        public static AndroidNDKTools GetInstanceOrThrowException()
        {
            AndroidNDKTools instance = GetInstance();

            if (instance == null)
            {
                throw new UnityException("Unable to locate Android NDK!");
            }
            return(instance);
        }
예제 #2
0
 public static AndroidNDKTools GetInstance()
 {
     string ndkPath = EditorPrefs.GetString("AndroidNdkRoot");
     if (!AndroidNdkRoot.VerifyNdkDir(ndkPath))
     {
         ndkPath = AndroidNdkRoot.Browse(ndkPath);
         if (!AndroidNdkRoot.VerifyNdkDir(ndkPath))
         {
             return null;
         }
         EditorPrefs.SetString("AndroidNdkRoot", ndkPath);
     }
     if ((s_Instance == null) || (ndkPath != s_Instance.NDKRootDir))
     {
         s_Instance = new AndroidNDKTools(ndkPath);
     }
     return s_Instance;
 }
예제 #3
0
        public static AndroidNDKTools GetInstance()
        {
            string ndkPath = EditorPrefs.GetString("AndroidNdkRoot");

            if (!AndroidNdkRoot.VerifyNdkDir(ndkPath))
            {
                ndkPath = AndroidNdkRoot.Browse(ndkPath);
                if (!AndroidNdkRoot.VerifyNdkDir(ndkPath))
                {
                    return(null);
                }
                EditorPrefs.SetString("AndroidNdkRoot", ndkPath);
            }
            if ((s_Instance == null) || (ndkPath != s_Instance.NDKRootDir))
            {
                s_Instance = new AndroidNDKTools(ndkPath);
            }
            return(s_Instance);
        }