Skip to content

FogBugz#1348462 Random Crash fix from HDRP Wizard #5141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ static HDWizard()

static void WizardBehaviourDelayed()
{
if (!HDProjectSettings.wizardIsStartPopup)
throw new Exception(
$"HDProjectSettings.wizardIsStartPopup must be true");

if (frameToWait > 0)
{
--frameToWait;
Expand All @@ -265,6 +261,10 @@ static void WizardBehaviourDelayed()
// No need to update this method, unsubscribe from the application update
EditorApplication.update -= WizardBehaviourDelayed;

// If the wizard does not need to be shown at start up, do nothing.
if (!HDProjectSettings.wizardIsStartPopup)
return;

//Application.isPlaying cannot be called in constructor. Do it here
if (Application.isPlaying)
return;
Expand Down Expand Up @@ -307,10 +307,6 @@ static void CheckPersistencyPopupAlreadyOpened()
[Callbacks.DidReloadScripts]
static void WizardBehaviour()
{
// If the wizard does not need to be shown at start up, do nothing.
if (!HDProjectSettings.wizardIsStartPopup)
return;

//We need to wait at least one frame or the popup will not show up
frameToWait = 10;
EditorApplication.update += WizardBehaviourDelayed;
Expand Down