Files
UnrealEngineUWP/Engine/Source/Developer/Virtualization/Private/SVirtualizationRevisionControlConnectionDialog.cpp

358 lines
11 KiB
C++
Raw Normal View History

Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "SVirtualizationRevisionControlConnectionDialog.h"
#if UE_VA_WITH_SLATE
#include "Async/ManualResetEvent.h"
#include "Framework/Application/SlateApplication.h"
#include "Framework/Docking/TabManager.h"
#include "HAL/IConsoleManager.h"
#include "Misc/App.h"
#include "Misc/ConfigCacheIni.h"
#include "SourceControlHelpers.h"
#include "Styling/StyleColors.h"
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
#include "Widgets/Images/SImage.h"
#include "Widgets/Input/SButton.h"
#include "Widgets/Input/SEditableTextBox.h"
#include "Widgets/Input/SHyperlink.h"
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
#include "Widgets/SBoxPanel.h"
#include "Widgets/Text/STextBlock.h"
#include "VirtualizationManager.h"
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
#define LOCTEXT_NAMESPACE "Virtualization"
namespace UE::Virtualization
{
SRevisionControlConnectionDialog::FResult SRevisionControlConnectionDialog::RunDialog(FStringView RevisionControlName, FStringView ConfigSectionName, FStringView CurrentPort, FStringView CurrentUsername, const FText& ErrorMessage)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
{
if (FApp::IsUnattended())
{
UE_LOG(LogVirtualization, Warning, TEXT("Skipping attempt to show SRevisionControlConnectionDialog as the application is unattended"));
return FResult();
}
if (!IsInGameThread())
{
UE_LOG(LogVirtualization, Warning, TEXT("Attempting to show SRevisionControlConnectionDialog on a worker thread!"));
return FResult();
}
if (!FSlateApplication::IsInitialized() || FSlateApplication::Get().GetRenderer() == nullptr)
{
UE_LOG(LogVirtualization, Warning, TEXT("Attempting to show SRevisionControlConnectionDialog before slate is initialized"));
return FResult();
}
UE_LOG(LogVirtualization, Display, TEXT("Creating dialog"));
FText WindowTitle = FText::Format(LOCTEXT("VASCSettings", "Virtualized Assets - {0} Revision Control Settings"), FText::FromStringView(RevisionControlName));
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
TSharedPtr<SWindow> DialogWindow = SNew(SWindow)
.Title(MoveTemp(WindowTitle))
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.FocusWhenFirstShown(true)
.SupportsMinimize(false)
.SupportsMaximize(false)
.SizingRule(ESizingRule::Autosized)
.HasCloseButton(false);
TSharedPtr<SRevisionControlConnectionDialog> DialogWidget;
TSharedPtr<SBorder> DialogWrapper =
SNew(SBorder)
.Padding(4.0f)
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
.Padding(16.0f, 16.0f, 16.0f, 0.0f)
[
SAssignNew(DialogWidget, SRevisionControlConnectionDialog, RevisionControlName, ConfigSectionName, CurrentPort, CurrentUsername, ErrorMessage)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.Window(DialogWindow)
]
];
DialogWindow->SetContent(DialogWrapper.ToSharedRef());
UE_LOG(LogVirtualization, Display, TEXT("Connection to revision control for virtualized assets failed. Offering the user the choice to retry or continue anyway"));
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
TSharedPtr<SWindow> ParentWindow = FSlateApplication::Get().GetActiveTopLevelWindow();
FSlateApplication::Get().AddModalWindow(DialogWindow.ToSharedRef(), ParentWindow);
switch (DialogWidget->GetResult())
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
{
case EResult::Retry:
return FResult(DialogWidget->GetPort(), DialogWidget->GetUserName());
case EResult::Skip:
return FResult();
default:
checkNoEntry();
return FResult();
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
}
}
void SRevisionControlConnectionDialog::Construct(const FArguments& InArgs, FStringView RevisionControlName, FStringView InConfigSectionName, FStringView CurrentPort, FStringView CurrentUsername, const FText& ErrorMessage)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
{
WindowWidget = InArgs._Window;
const FString ConnectionHelpUrl = FVirtualizationManager::GetConnectionHelpUrl();
ConfigSectionName = InConfigSectionName;
FText MessagePt1 = FText::Format(LOCTEXT("VASCMsgPt1", "Failed to connect to the {0} revision control server with the following errors:"), FText::FromStringView(RevisionControlName));
FText MessagePt2 = FText::Format(LOCTEXT("VASCMsgPt2", "This may prevent you from loading virtualized assets in the future!\nPlease enter the correct {0} revision control settings below:"), FText::FromStringView(RevisionControlName));
const FText PortToolTip = FText::Format(LOCTEXT("PortLabel_Tooltip", "The server and port for your {0} server. Usage ServerName:1234."), FText::FromStringView(RevisionControlName));
const FText UserToolTip = FText::Format(LOCTEXT("UserNameLabel_Tooltip", "{0} username."), FText::FromStringView(RevisionControlName));
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
ChildSlot
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 16.0f, 16.0f))
.AutoHeight()
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 8.0f, 0.0f))
.HAlign(HAlign_Left)
.AutoWidth()
[
SNew(SVerticalBox)
+SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 0.0f))
.AutoHeight()
[
SNew(SImage)
.Image(FAppStyle::GetBrush("Icons.Error"))
]
]
+ SHorizontalBox::Slot()
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 0.0f))
.AutoHeight()
[
SNew(STextBlock)
.Text(MoveTemp(MessagePt1))
.AutoWrapText(true)
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 16.0f, 0.0f, 16.0f))
.AutoHeight()
[
SNew(SBorder)
.BorderImage(FAppStyle::Get().GetBrush("BlackBrush"))
[
SNew(STextBlock)
.ColorAndOpacity(FSlateColor(EStyleColor::Error))
.Text(ErrorMessage)
.AutoWrapText(true)
]
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 0.0f))
.AutoHeight()
[
SNew(STextBlock)
.Text(MoveTemp(MessagePt2))
.AutoWrapText(true)
]
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
]
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 16.0f, 16.0f))
.AutoHeight()
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.FillWidth(0.2f)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.Padding(FMargin(0.0f, 0.0f, 16.0f, 0.0f))
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 10.0f))
.VAlign(VAlign_Center)
.HAlign(HAlign_Right)
[
SNew(STextBlock)
.Text(LOCTEXT("PortLabel", "Server"))
.ToolTipText(PortToolTip)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 10.0f))
.VAlign(VAlign_Center)
.HAlign(HAlign_Right)
[
SNew(STextBlock)
.Text(LOCTEXT("UserNameLabel", "User Name"))
.ToolTipText(UserToolTip)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
]
]
+ SHorizontalBox::Slot()
.FillWidth(0.8f)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.VAlign(VAlign_Center)
.Padding(FMargin(0.0f, 0.0f, 0.0f, 10.0f))
[
SAssignNew(PortTextWidget, SEditableTextBox)
.Text(FText::FromString(FString(CurrentPort)))
.ToolTipText(PortToolTip)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 10.0f))
.VAlign(VAlign_Center)
[
SAssignNew(UsernameTextWidget, SEditableTextBox)
.Text(FText::FromString(FString(CurrentUsername)))
.ToolTipText(UserToolTip)
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
]
]
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 16.0f, 16.0f))
.AutoHeight()
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 8.0f, 0.0f))
.HAlign(HAlign_Left)
.AutoWidth()
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 0.0f, 0.0f, 0.0f))
.AutoHeight()
[
SNew(SImage)
.Image(FAppStyle::GetBrush("Icons.Warning"))
]
]
+ SHorizontalBox::Slot()
[
SNew(STextBlock)
.Text(LOCTEXT("VASCSkipWarning", "Skipping may cause future editor instability if virtualized data is required!"))
.AutoWrapText(true)
]
]
+ SVerticalBox::Slot()
.HAlign(HAlign_Right)
.AutoHeight()
[
SNew(SHyperlink)
.Text(LOCTEXT("VASCHelpUrl", "Click here for additional documentation"))
.ToolTipText(FText::FromString(ConnectionHelpUrl))
.OnNavigate(this, &SRevisionControlConnectionDialog::OnUrlClicked)
.Visibility_Lambda([ConnectionHelpUrl] { return !ConnectionHelpUrl.IsEmpty() ? EVisibility::Visible : EVisibility::Hidden; })
]
+ SVerticalBox::Slot()
.Padding(FMargin(0.0f, 16.0f, 16.0f, 16.0f))
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.AutoHeight()
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.HAlign(HAlign_Left)
[
SNew(SButton)
.VAlign(VAlign_Center)
.TextStyle(FAppStyle::Get(), "DialogButtonText")
.Text(LOCTEXT("VASC_Reset", "Reset To Defaults"))
.ToolTipText(LOCTEXT("VASC_ResetTip", "Removes connection settings that may be saved to your local ini files and attempts to connect using your environment defaults"))
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.OnClicked(this, &SRevisionControlConnectionDialog::OnResetToDefaults)
]
+ SHorizontalBox::Slot()
.HAlign(HAlign_Right)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.AutoWidth()
[
SNew(SButton)
.VAlign(VAlign_Center)
.ButtonStyle(FAppStyle::Get(), "PrimaryButton")
.TextStyle(FAppStyle::Get(), "DialogButtonText")
.Text(LOCTEXT("VASC_Retry", "Retry Connection"))
.ToolTipText(LOCTEXT("VASC_RetryTip", "Attempts to reconnect to the revision control server with the settings that you entered"))
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.OnClicked(this, &SRevisionControlConnectionDialog::OnRetryConnection)
]
+ SHorizontalBox::Slot()
.AutoWidth()
.Padding(FMargin(10.0f, 0.0f, 0.0f, 0.0f))
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
[
SNew(SButton)
.VAlign(VAlign_Center)
.TextStyle(FAppStyle::Get(), "DialogButtonText")
.Text(LOCTEXT("VASC_Skip", "Skip"))
.ToolTipText(LOCTEXT("VASC_SkipTip", "The editor will continue to load but will be unable to pull virtualized data from revision control if needed"))
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
.OnClicked(this, &SRevisionControlConnectionDialog::OnSkip)
]
]
]
];
}
void SRevisionControlConnectionDialog::CloseModalDialog()
{
if (WindowWidget.IsValid())
{
WindowWidget.Pin()->RequestDestroyWindow();
}
}
FReply SRevisionControlConnectionDialog::OnResetToDefaults()
{
UE_LOG(LogVirtualization, Display, TEXT("User opted to clear the ini file settings and connect using the revision control defaults"));
GConfig->EmptySection(*ConfigSectionName, SourceControlHelpers::GetSettingsIni());
Result = EResult::Retry;
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
Port.Empty();
UserName.Empty();
CloseModalDialog();
return FReply::Handled();
}
FReply SRevisionControlConnectionDialog::OnRetryConnection()
{
UE_LOG(LogVirtualization, Display, TEXT("User opted to retry connecting to revision control"));
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
Result = EResult::Retry;
Port = PortTextWidget->GetText().ToString();
UserName = UsernameTextWidget->GetText().ToString();
CloseModalDialog();
return FReply::Handled();
}
FReply SRevisionControlConnectionDialog::OnSkip()
{
UE_LOG(LogVirtualization, Warning, TEXT("User opted not to connect to revision control. Virtualized data may not be accessible!"));
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
Result = EResult::Skip;
CloseModalDialog();
return FReply::Handled();
}
void SRevisionControlConnectionDialog::OnUrlClicked() const
{
const FString ConnectionHelpUrl = FVirtualizationManager::GetConnectionHelpUrl();
FPlatformProcess::LaunchURL(*ConnectionHelpUrl, nullptr, nullptr);
}
Now if the VA source control backend fails to connect we can display a dialog to the user asking for the correct credentials directly. Currently disabled by default. #rb none ### Dialog - When the source control backend tries to connect and fails we will now show a dialog allowing the user to try new settings rather than let the editor continue and crash. - The dialog will allow the user to enter the server address (P4PORT) and their username (P4USER). - Once the dialog is displayed the user will have three options to continue. -- "Reset To Defaults" which will remove all settings saved to the users local ini files and attempt to use the environment defaults to connect. -- "Retry Connection" which will take the new address and username that the user provided and attempt to connect with those settings. -- "Skip" no connection attempt will be made. This may cause instability later if the user needs data that they cannot access. - If the connection succeeds after the user has reset to defaults or provided new settings, then they will be saved in the local ini file for future sessions. - The dialog will not show if: -- Slate is disabled for the current processor has not yet initialized -- The error is found not on the game thread. This means that lazy init will not currently work well with this dialog. Attempts to mashal the error to the game thread have been spotty at best and there is a high chance of thread locking so attempts were abandoned. -- If the -unattended flag is set on the process. -- If the dialog is disabled via the config file when setting up the backend (UseRetryConnectionDialog=False) -- If 'engine.ini:[Core.VirtualizationModule]:UseLocalIniFileSettings' is false as future sessions would not be able to use the new settings and would become tiresome. In these cases the environment settings will need to be fixed. - If the dialog is now shown then the backend is marked as unconnected and will not work. ### Known Issues - We currently cannot get the settings that the failed p4 connection used, nor the error message dueto how the API works. So for now we just display an empty server address and username edit box. This will be fixed when the API is changed. - There is currently no good way to inform the user where their settings come from. - There is no easy way to reset the settings once saved. To allow the user to change the server address to a better proxy for example. ### Initialization - In order to allow a slate dialog to be used, the initialization of the VA system has been moved later in pre init, to the first avaliable point after slate has initialized and its shaders have been built. This in theory should not cause a a problem as engine content cannot be virtualized. -- Added a new option 'engine.ini:[Core.ContentVirtualization]:InitPreSlate' with a default of false. When set to true the VA system will initialize in the original, earlier portion of engine pre init. This is only included in case an existing virtualized project encounters a problem with the new ordering. [CL 26115392 by paul chipchase in ue5-main branch]
2023-06-20 04:26:06 -04:00
} // namespace UE::Virtualization
#undef LOCTEXT_NAMESPACE
#endif //UE_VA_WITH_SLATE