Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rYuuk committed Sep 5, 2023
1 parent ac026ff commit 4a1b8a1
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions Editor/Module Management/ModuleInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ public static class ModuleInstaller

private const int THREAD_SLEEP_TIME = 100;
private const string PROGRESS_BAR_TITLE = "Ready Player Me";
private const string READY_PLAYER_ME_SYMBOL = "READY_PLAYER_ME";
private const string GLTFAST_SYMBOL = "GLTFAST";
private const string READY_PLAYER_ME_SYMBOL = "READY_PLAYER_ME";
private const string CORE_MODULE_NAME = "com.readyplayerme.core";
private const string GLTFAST_NAME = "com.atteneder.gltfast";

private const string MODULE_INSTALLATION_SUCCESS_MESSAGE =
"All the modules are installed successfully. Ready Player Me avatar system is ready to use.";
Expand All @@ -34,7 +35,6 @@ public static class ModuleInstaller

private const float TIMEOUT_FOR_MODULE_INSTALLATION = 20f;
private const string AVATAR_LOADER_SUBSTRING = "avatarloader";
private const string GLTFAST_NAME = "com.atteneder.gltfast";

private static bool modulesInstalled;

Expand All @@ -43,37 +43,22 @@ static ModuleInstaller()
# if RPM_DEVELOPMENT
modulesInstalled = true;
#endif
Debug.Log("Module Installer: core " + IsModuleInstalled("com.readyplayerme.core") + ", gltfast " + IsModuleInstalled(GLTFAST_NAME));

if (!modulesInstalled)
{
Events.registeredPackages += OnRegisteredPackages;
EditorApplication.LockReloadAssemblies();
InstallModules();
CoreSettingsHandler.CreateCoreSettings();
}

#if !GLTFAST
if (IsModuleInstalled(GLTFAST_NAME))
{
Debug.Log("Add symbol");
AddGltfastSymbol();
EditorApplication.UnlockReloadAssemblies();
AssetDatabase.Refresh();
EditorUtility.RequestScriptReload();

Debug.Log("Validating modules");
ValidateModules();
AddScriptingDefineSymbolToAllBuildTargetGroups(READY_PLAYER_ME_SYMBOL);
}
#endif

}

private static void OnRegisteredPackages(PackageRegistrationEventArgs obj)
{
Debug.Log("Yo package added");
}

/// <summary>
/// Installs the missing modules and displays a progress bar to notify the user.
/// </summary>
Expand Down

0 comments on commit 4a1b8a1

Please sign in to comment.