UXREnvFix.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  1. using System.Net.Http.Headers;
  2. using System.IO;
  3. using UnityEditor;
  4. using UnityEngine;
  5. using UnityEngine.Rendering;
  6. using UnityEngine.XR.Management;
  7. using UnityEditor.XR.Management;
  8. /*
  9. namespace Rokid.UXR.Editor
  10. {
  11. [InitializeOnLoad]
  12. public class UXREnvFix : EditorWindow
  13. {
  14. #region Config
  15. private const string ignorePrefix = "UXREnvFix";
  16. private static FixItem[] fixItems;
  17. private static UXREnvFix window;
  18. private Vector2 scrollPosition;
  19. private static string cardboardVersion = "1.21.4";
  20. private static string minUnityVersion = "2020.3.26";
  21. private static AndroidSdkVersions minSdkVersion = AndroidSdkVersions.AndroidApiLevel26;
  22. private static AndroidArchitecture targetArchitecture = AndroidArchitecture.ARM64;
  23. #endregion
  24. static UXREnvFix()
  25. {
  26. EditorApplication.update -= OnUpdate;
  27. EditorApplication.update += OnUpdate;
  28. }
  29. private static void OnUpdate()
  30. {
  31. bool show = false;
  32. if (fixItems == null) { RegisterItems(); }
  33. foreach (var item in fixItems)
  34. {
  35. if (!item.IsIgnored() && !item.IsValid() && item.Level > MessageType.Warning && item.IsAutoPop())
  36. {
  37. show = true;
  38. }
  39. }
  40. if (show)
  41. {
  42. ShowWindow();
  43. }
  44. EditorApplication.update -= OnUpdate;
  45. }
  46. private static void RegisterItems()
  47. {
  48. fixItems = new FixItem[]
  49. {
  50. new CheckBuildTarget(MessageType.Error),
  51. new CheckUnityMinVersion(MessageType.Error),
  52. // #if UNITY_2020_3_OR_NEWER
  53. // new CheckCardboardPackage(MessageType.Error),
  54. // #endif
  55. new CkeckMTRendering(MessageType.Error),
  56. new CkeckAndroidGraphicsAPI(MessageType.Error),
  57. new CkeckAndroidOrientation(MessageType.Warning),
  58. // new CkeckColorSpace(MessageType.Warning),
  59. new CheckOptimizedFramePacing(MessageType.Warning),
  60. new CheckMinmumAPILevel(MessageType.Error),
  61. new CheckArchitecture(MessageType.Error)
  62. };
  63. }
  64. [MenuItem("UXR/Env/Project Environment Fix", false)]
  65. public static void ShowWindow()
  66. {
  67. RegisterItems();
  68. window = GetWindow<UXREnvFix>(true);
  69. window.minSize = new Vector2(320, 300);
  70. window.maxSize = new Vector2(320, 800);
  71. window.titleContent = new GUIContent("UXR SDK | Environment Fix");
  72. }
  73. //[MenuItem("UXR/Env/Delete Ignore", false)]
  74. public static void DeleteIgonre()
  75. {
  76. foreach (var item in fixItems)
  77. {
  78. item.DeleteIgonre();
  79. }
  80. }
  81. public void OnGUI()
  82. {
  83. string resourcePath = GetResourcePath();
  84. Texture2D logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "RokidIcon.png");
  85. Rect rect = GUILayoutUtility.GetRect(position.width, 80, GUI.skin.box);
  86. GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit);
  87. string aboutText = "This window provides tips to help fix common issues with UXR SDK and your project.";
  88. EditorGUILayout.LabelField(aboutText, EditorStyles.textArea);
  89. int ignoredCount = 0;
  90. int fixableCount = 0;
  91. int invalidNotIgnored = 0;
  92. for (int i = 0; i < fixItems.Length; i++)
  93. {
  94. FixItem item = fixItems[i];
  95. bool ignored = item.IsIgnored();
  96. bool valid = item.IsValid();
  97. bool fixable = item.IsFixable();
  98. if (!valid && !ignored && fixable)
  99. {
  100. fixableCount++;
  101. }
  102. if (!valid && !ignored)
  103. {
  104. invalidNotIgnored++;
  105. }
  106. if (ignored)
  107. {
  108. ignoredCount++;
  109. }
  110. }
  111. Rect issuesRect = EditorGUILayout.GetControlRect();
  112. GUI.Box(new Rect(issuesRect.x - 4, issuesRect.y, issuesRect.width + 8, issuesRect.height), "Tips", EditorStyles.toolbarButton);
  113. if (invalidNotIgnored > 0)
  114. {
  115. scrollPosition = GUILayout.BeginScrollView(scrollPosition);
  116. {
  117. for (int i = 0; i < fixItems.Length; i++)
  118. {
  119. FixItem item = fixItems[i];
  120. if (!item.IsIgnored() && !item.IsValid())
  121. {
  122. invalidNotIgnored++;
  123. GUILayout.BeginVertical("box");
  124. {
  125. item.DrawGUI();
  126. EditorGUILayout.BeginHorizontal();
  127. {
  128. // Aligns buttons to the right
  129. GUILayout.FlexibleSpace();
  130. if (item.IsFixable())
  131. {
  132. if (GUILayout.Button("Fix"))
  133. item.Fix();
  134. }
  135. //if (GUILayout.Button("Ignore"))
  136. // check.Ignore();
  137. }
  138. EditorGUILayout.EndHorizontal();
  139. }
  140. GUILayout.EndVertical();
  141. }
  142. }
  143. }
  144. GUILayout.EndScrollView();
  145. }
  146. GUILayout.FlexibleSpace();
  147. if (invalidNotIgnored == 0)
  148. {
  149. GUILayout.BeginHorizontal();
  150. {
  151. GUILayout.FlexibleSpace();
  152. GUILayout.BeginVertical();
  153. {
  154. GUILayout.Label("No issue found");
  155. if (GUILayout.Button("Close Window"))
  156. Close();
  157. }
  158. GUILayout.EndVertical();
  159. GUILayout.FlexibleSpace();
  160. }
  161. GUILayout.EndHorizontal();
  162. GUILayout.FlexibleSpace();
  163. }
  164. EditorGUILayout.BeginHorizontal("box");
  165. {
  166. if (fixableCount > 0)
  167. {
  168. if (GUILayout.Button("Accept All"))
  169. {
  170. if (EditorUtility.DisplayDialog("Accept All", "Are you sure?", "Yes, Accept All", "Cancel"))
  171. {
  172. for (int i = 0; i < fixItems.Length; i++)
  173. {
  174. FixItem item = fixItems[i];
  175. if (!item.IsIgnored() &&
  176. !item.IsValid())
  177. {
  178. if (item.IsFixable())
  179. item.Fix();
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }
  186. GUILayout.EndHorizontal();
  187. }
  188. private string GetResourcePath()
  189. {
  190. var ms = MonoScript.FromScriptableObject(this);
  191. var path = AssetDatabase.GetAssetPath(ms);
  192. path = Path.GetDirectoryName(path);
  193. return path + "\\Textures\\";
  194. }
  195. private abstract class FixItem
  196. {
  197. protected string key;
  198. protected MessageType level;
  199. public MessageType Level
  200. {
  201. get
  202. {
  203. return level;
  204. }
  205. }
  206. public FixItem(MessageType level)
  207. {
  208. this.level = level;
  209. }
  210. public void Ignore()
  211. {
  212. EditorPrefs.SetBool(ignorePrefix + key, true);
  213. }
  214. public bool IsIgnored()
  215. {
  216. return EditorPrefs.HasKey(ignorePrefix + key);
  217. }
  218. public void DeleteIgonre()
  219. {
  220. RKLog.Info("DeleteIgnore" + ignorePrefix + key);
  221. EditorPrefs.DeleteKey(ignorePrefix + key);
  222. }
  223. public abstract bool IsValid();
  224. public abstract bool IsAutoPop();
  225. public abstract void DrawGUI();
  226. public abstract bool IsFixable();
  227. public abstract void Fix();
  228. protected void DrawContent(string title, string msg)
  229. {
  230. EditorGUILayout.HelpBox(title, level);
  231. EditorGUILayout.LabelField(msg, EditorStyles.textArea);
  232. }
  233. }
  234. private class CheckCardboardPackage : FixItem
  235. {
  236. private enum PackageStates
  237. {
  238. None,
  239. WaitingForList,
  240. Failed,
  241. Added,
  242. }
  243. UnityEditor.PackageManager.Requests.ListRequest request;
  244. PackageStates packageState = PackageStates.None;
  245. bool isvalid = true;
  246. bool initOnStart;
  247. bool hasLoader;
  248. public CheckCardboardPackage(MessageType level) : base(level)
  249. {
  250. key = this.GetType().Name;
  251. request = null;
  252. isvalid = true;
  253. #if UNITY_2020_3_OR_NEWER
  254. EditorApplication.update -= CheckPackageUpdate;
  255. EditorApplication.update += CheckPackageUpdate;
  256. #endif
  257. }
  258. #if UNITY_2020_3_OR_NEWER
  259. void CheckPackageUpdate()
  260. {
  261. switch (packageState)
  262. {
  263. case PackageStates.None:
  264. request = UnityEditor.PackageManager.Client.List(true, false);
  265. packageState = PackageStates.WaitingForList;
  266. break;
  267. case PackageStates.WaitingForList:
  268. if (request.IsCompleted)
  269. {
  270. if (request.Error != null || request.Status == UnityEditor.PackageManager.StatusCode.Failure)
  271. {
  272. packageState = PackageStates.Failed;
  273. break;
  274. }
  275. UnityEditor.PackageManager.PackageCollection col = request.Result;
  276. foreach (var info in col)
  277. {
  278. if (info.name == "com.google.xr.cardboard" && info.version == cardboardVersion)
  279. {
  280. packageState = PackageStates.Added;
  281. isvalid = true;
  282. break;
  283. }
  284. }
  285. if (packageState != PackageStates.Added) isvalid = false;
  286. }
  287. break;
  288. default:
  289. break;
  290. }
  291. }
  292. #endif
  293. public override bool IsValid()
  294. {
  295. return (isvalid && initOnStart && hasLoader);
  296. }
  297. public override void DrawGUI()
  298. {
  299. string message = @"You must upgrade Cardboard XR Plugin to version:" + cardboardVersion + @",
  300. in dropdown list of Window> Package Manager >'+' Button >Add package from disk >Select the package.json file in the root directory of the local Cardboard XR Plugin .
  301. Select XR Plug-in Management in the Project Settings window>Initialize XR on Startup checked>Cardboard XR Plugin Checked";
  302. DrawContent("Cardboard XR Plugin is not setup correctly", message);
  303. }
  304. public override bool IsFixable()
  305. {
  306. if (isvalid)
  307. {
  308. XRGeneralSettings sets = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(BuildTargetGroup.Android);
  309. if (sets != null)
  310. {
  311. initOnStart = sets.InitManagerOnStart;
  312. XRManagerSettings plugins = sets.AssignedSettings;
  313. var loaders = sets.Manager.activeLoaders;
  314. hasLoader = false;
  315. for (int i = 0; i < loaders.Count; i++)
  316. {
  317. if (loaders[i].GetType() == typeof(Rokid.XR.Core.XRLoader))
  318. hasLoader = true;
  319. break;
  320. }
  321. if (!hasLoader || !initOnStart) return true;
  322. }
  323. }
  324. return false;
  325. }
  326. public override void Fix()
  327. {
  328. var sets = XRGeneralSettingsPerBuildTarget.XRGeneralSettingsForBuildTarget(BuildTargetGroup.Android);
  329. bool initOnStart = sets.InitManagerOnStart;
  330. if (!initOnStart) sets.InitManagerOnStart = true;
  331. XRManagerSettings plugins = sets.AssignedSettings;
  332. var loaders = sets.Manager.activeLoaders;
  333. bool hasLoader = false;
  334. for (int i = 0; i < loaders.Count; i++)
  335. {
  336. if (loaders[i].GetType() == typeof(Rokid.XR.Core.XRLoader))
  337. hasLoader = true;
  338. break;
  339. }
  340. if (!hasLoader)
  341. {
  342. var xrLoader = new Rokid.XR.Core.XRLoader();
  343. plugins.TryAddLoader(xrLoader);
  344. }
  345. }
  346. public override bool IsAutoPop()
  347. {
  348. return false;
  349. }
  350. }
  351. private class CkeckAndroidGraphicsAPI : FixItem
  352. {
  353. public CkeckAndroidGraphicsAPI(MessageType level) : base(level)
  354. {
  355. key = this.GetType().Name;
  356. }
  357. public override bool IsValid()
  358. {
  359. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  360. {
  361. if (PlayerSettings.GetUseDefaultGraphicsAPIs(BuildTarget.Android))
  362. {
  363. return false;
  364. }
  365. var graphics = PlayerSettings.GetGraphicsAPIs(BuildTarget.Android);
  366. if (graphics != null && graphics.Length >= 1 &&
  367. graphics[0] == UnityEngine.Rendering.GraphicsDeviceType.OpenGLES3)
  368. {
  369. return true;
  370. }
  371. return false;
  372. }
  373. else
  374. {
  375. return false;
  376. }
  377. }
  378. public override void DrawGUI()
  379. {
  380. string message = @"Graphics APIs should be set to OpenGLES. Player Settings > Other Settings > Graphics APIs , choose 'OpenGLES3'.";
  381. DrawContent("Graphics APIs is not OpenGLES", message);
  382. }
  383. public override bool IsFixable()
  384. {
  385. return true;
  386. }
  387. public override void Fix()
  388. {
  389. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  390. {
  391. PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.Android, false);
  392. PlayerSettings.SetGraphicsAPIs(BuildTarget.Android, new GraphicsDeviceType[1] { GraphicsDeviceType.OpenGLES3 });
  393. }
  394. }
  395. public override bool IsAutoPop()
  396. {
  397. return true;
  398. }
  399. }
  400. private class CkeckMTRendering : FixItem
  401. {
  402. public CkeckMTRendering(MessageType level) : base(level)
  403. {
  404. key = this.GetType().Name;
  405. }
  406. public override bool IsValid()
  407. {
  408. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  409. {
  410. return !PlayerSettings.GetMobileMTRendering(BuildTargetGroup.Android);
  411. }
  412. else
  413. {
  414. return false;
  415. }
  416. }
  417. public override void DrawGUI()
  418. {
  419. string message = @"In order to run correct on mobile devices, the RenderingThreadingMode should be set.
  420. in dropdown list of Player Settings > Other Settings > Multithreaded Rendering, close toggle.";
  421. DrawContent("Multithreaded Rendering not close", message);
  422. }
  423. public override bool IsFixable()
  424. {
  425. return true;
  426. }
  427. public override void Fix()
  428. {
  429. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  430. {
  431. PlayerSettings.SetMobileMTRendering(BuildTargetGroup.Android, false);
  432. }
  433. }
  434. public override bool IsAutoPop()
  435. {
  436. return true;
  437. }
  438. }
  439. private class CkeckAndroidOrientation : FixItem
  440. {
  441. public CkeckAndroidOrientation(MessageType level) : base(level)
  442. {
  443. key = this.GetType().Name;
  444. }
  445. public override bool IsValid()
  446. {
  447. return PlayerSettings.defaultInterfaceOrientation == UIOrientation.Portrait;
  448. }
  449. public override void DrawGUI()
  450. {
  451. string message = @"In order to display correct on mobile devices, the orientation should be set to portrait.
  452. in dropdown list of Player Settings > Resolution and Presentation > Default Orientation, choose 'Portrait'.";
  453. DrawContent("Orientation is not portrait", message);
  454. }
  455. public override bool IsFixable()
  456. {
  457. return true;
  458. }
  459. public override void Fix()
  460. {
  461. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  462. {
  463. PlayerSettings.defaultInterfaceOrientation = UIOrientation.Portrait;
  464. }
  465. }
  466. public override bool IsAutoPop()
  467. {
  468. return true;
  469. }
  470. }
  471. private class CkeckColorSpace : FixItem
  472. {
  473. public CkeckColorSpace(MessageType level) : base(level)
  474. {
  475. key = this.GetType().Name;
  476. }
  477. public override bool IsValid()
  478. {
  479. return PlayerSettings.colorSpace == ColorSpace.Gamma;
  480. }
  481. public override void DrawGUI()
  482. {
  483. string message = @"In order to display correct on mobile devices, the colorSpace should be set to gamma.
  484. in dropdown list of Player Settings > Other Settings > Color Space, choose 'Gamma'.";
  485. DrawContent("ColorSpace is not Linear", message);
  486. }
  487. public override bool IsFixable()
  488. {
  489. return true;
  490. }
  491. public override void Fix()
  492. {
  493. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  494. {
  495. PlayerSettings.colorSpace = ColorSpace.Gamma;
  496. }
  497. }
  498. public override bool IsAutoPop()
  499. {
  500. return true;
  501. }
  502. }
  503. private class CkeckAndroidPermission : FixItem
  504. {
  505. public CkeckAndroidPermission(MessageType level) : base(level)
  506. {
  507. key = this.GetType().Name;
  508. }
  509. public override bool IsValid()
  510. {
  511. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  512. {
  513. return PlayerSettings.Android.forceInternetPermission;
  514. }
  515. else
  516. {
  517. return false;
  518. }
  519. }
  520. public override void DrawGUI()
  521. {
  522. string message = @"In order to run correct on mobile devices, the internet access premission should be set.
  523. in dropdown list of Player Settings > Other Settings > Internet Access, choose 'Require'.";
  524. DrawContent("internet access permission not available", message);
  525. }
  526. public override bool IsFixable()
  527. {
  528. return true;
  529. }
  530. public override void Fix()
  531. {
  532. if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android)
  533. {
  534. PlayerSettings.Android.forceInternetPermission = true;
  535. }
  536. }
  537. public override bool IsAutoPop()
  538. {
  539. return true;
  540. }
  541. }
  542. //todo...添加最低版本号的检查
  543. private class CheckUnityMinVersion : FixItem
  544. {
  545. string unityVersion;//
  546. public CheckUnityMinVersion(MessageType level) : base(level)
  547. {
  548. key = this.GetType().Name;
  549. unityVersion = Application.unityVersion;
  550. }
  551. public override void DrawGUI()
  552. {
  553. string message = @"The minimum Unity version required is 2020.3.36";
  554. DrawContent("Unity version not valid ", message);
  555. }
  556. public override void Fix()
  557. {
  558. }
  559. public override bool IsAutoPop()
  560. {
  561. return true;
  562. }
  563. public override bool IsFixable()
  564. {
  565. return unityVersion.CompareTo(minUnityVersion) == 1;
  566. }
  567. public override bool IsValid()
  568. {
  569. return unityVersion.CompareTo(minUnityVersion) == 1;
  570. }
  571. }
  572. private class CheckOptimizedFramePacing : FixItem
  573. {
  574. public CheckOptimizedFramePacing(MessageType level) : base(level)
  575. {
  576. key = this.GetType().Name;
  577. }
  578. public override void DrawGUI()
  579. {
  580. string message = @"The optimizedFramePacing need to unselect";
  581. DrawContent("OptimizedFramePacing", message);
  582. }
  583. public override void Fix()
  584. {
  585. PlayerSettings.Android.optimizedFramePacing = false;
  586. }
  587. public override bool IsAutoPop()
  588. {
  589. return true;
  590. }
  591. public override bool IsFixable()
  592. {
  593. return true;
  594. }
  595. public override bool IsValid()
  596. {
  597. return PlayerSettings.Android.optimizedFramePacing == false;
  598. }
  599. }
  600. private class CheckMinmumAPILevel : FixItem
  601. {
  602. public CheckMinmumAPILevel(MessageType level) : base(level)
  603. {
  604. key = this.GetType().Name;
  605. }
  606. public override void DrawGUI()
  607. {
  608. string message = @"The minSdkVersion needs to be " + minSdkVersion.ToString();
  609. DrawContent("MinSDKVersion", message);
  610. }
  611. public override void Fix()
  612. {
  613. PlayerSettings.Android.minSdkVersion = minSdkVersion;
  614. }
  615. public override bool IsAutoPop()
  616. {
  617. return true;
  618. }
  619. public override bool IsFixable()
  620. {
  621. return true;
  622. }
  623. public override bool IsValid()
  624. {
  625. return PlayerSettings.Android.minSdkVersion >= minSdkVersion;
  626. }
  627. }
  628. private class CheckArchitecture : FixItem
  629. {
  630. public CheckArchitecture(MessageType level) : base(level)
  631. {
  632. key = this.GetType().Name;
  633. }
  634. public override void DrawGUI()
  635. {
  636. string message = @"The Target Architecture should be " + targetArchitecture;
  637. DrawContent("Target Architecture", message);
  638. }
  639. public override void Fix()
  640. {
  641. PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.IL2CPP);
  642. PlayerSettings.Android.targetArchitectures = targetArchitecture;
  643. }
  644. public override bool IsAutoPop()
  645. {
  646. return true;
  647. }
  648. public override bool IsFixable()
  649. {
  650. return true;
  651. }
  652. public override bool IsValid()
  653. {
  654. return PlayerSettings.GetScriptingBackend(BuildTargetGroup.Android) == ScriptingImplementation.IL2CPP &&
  655. PlayerSettings.Android.targetArchitectures == targetArchitecture;
  656. }
  657. }
  658. private class CheckBuildTarget : FixItem
  659. {
  660. public CheckBuildTarget(MessageType level) : base(level)
  661. {
  662. key = this.GetType().Name;
  663. }
  664. public override void DrawGUI()
  665. {
  666. string message = @"The Build Target should be Android";
  667. DrawContent("Build Target", message);
  668. }
  669. public override void Fix()
  670. {
  671. EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
  672. }
  673. public override bool IsAutoPop()
  674. {
  675. return true;
  676. }
  677. public override bool IsFixable()
  678. {
  679. return true;
  680. }
  681. public override bool IsValid()
  682. {
  683. return EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android;
  684. }
  685. }
  686. }
  687. }*/