static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { if (importedAssets.Any(_ => _.Contains($"{nameof(AssetPostprocessor)}.cs"))) { ARFoundationRemoteInstaller.OnImport(); } }
static void showMethodsInInspector(params Object[] targets) { var target = targets.First() as ARFoundationRemoteInstaller; Assert.IsNotNull(target); if (isInstalled) { GUILayout.Space(16); GUILayout.Label("AR Companion app", EditorStyles.boldLabel); if (GUILayout.Button("Install AR Companion App", new GUIStyle(GUI.skin.button) { fontStyle = FontStyle.Bold })) { execute(() => CompanionAppInstaller.BuildAndRun(target.optionalCompanionAppExtension, target.modifyAppId)); } if (GUILayout.Button("Build AR Companion and show in folder", new GUIStyle(GUI.skin.button))) { execute(() => CompanionAppInstaller.Build(target.optionalCompanionAppExtension, target.modifyAppId)); } if (GUILayout.Button("Open Plugin Settings")) { #if AR_FOUNDATION_REMOTE_INSTALLED Selection.activeObject = Runtime.Settings.Instance; #endif } if (GUILayout.Button("Delete AR Companion app build folder")) { execute(CompanionAppInstaller.DeleteCompanionAppBuildFolder); } GUILayout.Space(16); if (GUILayout.Button("Apply AR Foundation fixes")) { #if AR_FOUNDATION_REMOTE_INSTALLED AutoARFoundationFixes.Enabled = true; FixesForEditorSupport.Apply(true); #endif } GUILayout.Space(16); GUILayout.Label(ARFoundationRemoteInstaller.displayName, EditorStyles.boldLabel); if (GUILayout.Button("Un-install Plugin", new GUIStyle(GUI.skin.button) { normal = { textColor = Color.red } })) { AutoARFoundationFixes.Enabled = false; ARFoundationRemoteInstaller.UnInstallPlugin(); } } else { if (GUILayout.Button("Install Plugin")) { ARFoundationRemoteInstaller.InstallPlugin(true); } } }