Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public static class AppArgsFlags

public const string IDENTITY_EXPIRATION_DURATION = "identity-expiration-duration";

public const string FORCE_ONBOARDING = "force-onboarding";

public const string SIMULATE_MEMORY = "simulateMemory";

public const string LAUNCH_CDP_MONITOR_ON_START = "launch-cdp-monitor-on-start";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ CancellationToken ct
IAppArgs appArgs,
ICoroutineRunner coroutineRunner,
DCLVersion dclVersion,
CancellationToken ct)
CancellationToken ct,
bool forceOnboarding)
{
(DynamicWorldContainer? container, bool) result =
await core.LoadDynamicWorldContainerAsync(bootstrapContainer, staticContainer, scenePluginSettingsContainer,
settings, dynamicSettings, backgroundMusic, worldInfoTool, playerEntity, appArgs, coroutineRunner, dclVersion, ct);
settings, dynamicSettings, backgroundMusic, worldInfoTool, playerEntity, appArgs, coroutineRunner, dclVersion, ct, forceOnboarding);

analytics.Track(General.INITIAL_LOADING, new JsonObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ await StaticContainer.CreateAsync(
IAppArgs appArgs,
ICoroutineRunner coroutineRunner,
DCLVersion dclVersion,
CancellationToken ct)
CancellationToken ct,
bool forceOnboarding)
{
dynamicWorldDependencies = new DynamicWorldDependencies
(
Expand Down Expand Up @@ -180,7 +181,8 @@ await StaticContainer.CreateAsync(
coroutineRunner,
dclVersion,
realmUrls,
ct);
ct,
forceOnboarding);

if (tuple.container != null)
profileRepositoryProxy.SetObject(tuple.container.ProfileRepository);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ public class DebugSettings
private bool enableLandscape;
[SerializeField]
private bool enableLOD;
[SerializeField] private bool enableVersionUpdateGuard;
[SerializeField]
private bool enableVersionUpdateGuard;
[SerializeField]
private bool forceOnboarding;
[SerializeField]
private bool enableEmulateNoLivekitConnection;
[SerializeField] [Tooltip("Enable Portable Experiences obtained from Feature Flags from loading at the start of the game")]
Expand All @@ -45,6 +48,7 @@ public static DebugSettings Release() =>
enableLandscape = true,
enableLOD = true,
enableVersionUpdateGuard = true,
forceOnboarding = false,
portableExperiencesEnsToLoad = null,
enableEmulateNoLivekitConnection = false,
overrideConnectionQuality = false,
Expand All @@ -64,6 +68,7 @@ public static DebugSettings Release() =>
public bool EnableLandscape => Application.isEditor ? this.enableLandscape : RELEASE_SETTINGS.enableLandscape;
public bool EnableLOD => Application.isEditor ? this.enableLOD : RELEASE_SETTINGS.enableLOD;
public bool EnableVersionUpdateGuard => Application.isEditor ? this.enableVersionUpdateGuard : RELEASE_SETTINGS.enableVersionUpdateGuard;
public bool ForceOnboarding => Application.isEditor ? this.forceOnboarding : RELEASE_SETTINGS.forceOnboarding;
public bool EnableEmulateNoLivekitConnection => Application.isEditor? this.enableEmulateNoLivekitConnection : RELEASE_SETTINGS.enableEmulateNoLivekitConnection;
public bool OverrideConnectionQuality => Application.isEditor ? this.overrideConnectionQuality : RELEASE_SETTINGS.overrideConnectionQuality;
public ConnectionQuality ConnectionQuality => Application.isEditor ? this.connectionQuality : RELEASE_SETTINGS.connectionQuality;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ public override void Dispose()
ICoroutineRunner coroutineRunner,
DCLVersion dclVersion,
RealmUrls realmUrls,
CancellationToken ct)
CancellationToken ct,
bool forceOnboarding)
{
DynamicSettings dynamicSettings = dynamicWorldDependencies.DynamicSettings;
StaticContainer staticContainer = dynamicWorldDependencies.StaticContainer;
Expand Down Expand Up @@ -464,7 +465,8 @@ static IMultiPool MultiPoolFactory() =>
backgroundMusic,
roomHub,
localSceneDevelopment,
staticContainer.CharacterContainer);
staticContainer.CharacterContainer,
forceOnboarding);

IRealmNavigator realmNavigator = realmNavigatorContainer.RealmNavigator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ CancellationToken ct
IAppArgs appArgs,
ICoroutineRunner coroutineRunner,
DCLVersion dclVersion,
CancellationToken ct);
CancellationToken ct,
bool forceOnboarding);

UniTask<bool> InitializePluginsAsync(StaticContainer staticContainer, DynamicWorldContainer dynamicWorldContainer,
PluginSettingsContainer scenePluginSettingsContainer, PluginSettingsContainer globalPluginSettingsContainer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ public static InitializationFlowContainer Create(
AudioClipConfig backgroundMusic,
IRoomHub roomHub,
bool localSceneDevelopment,
CharacterContainer characterContainer)
CharacterContainer characterContainer,
bool forceOnboarding)
{
ILoadingStatus? loadingStatus = staticContainer.LoadingStatus;

var ensureLivekitConnectionStartupOperation = new EnsureLivekitConnectionStartupOperation(liveKitHealthCheck, roomHub);
var blocklistCheckStartupOperation = new BlocklistCheckStartupOperation(staticContainer.WebRequestsContainer, bootstrapContainer.IdentityCache!, bootstrapContainer.DecentralandUrlsSource);
var loadPlayerAvatarStartupOperation = new LoadPlayerAvatarStartupOperation(loadingStatus, selfProfile, staticContainer.MainPlayerAvatarBaseProxy);
var loadLandscapeStartupOperation = new LoadLandscapeStartupOperation(loadingStatus, terrainContainer.Landscape);
var checkOnboardingStartupOperation = new CheckOnboardingStartupOperation(loadingStatus, selfProfile, decentralandUrlsSource, appArgs, realmContainer.RealmController);
var checkOnboardingStartupOperation = new CheckOnboardingStartupOperation(loadingStatus, selfProfile, decentralandUrlsSource, appArgs, realmContainer.RealmController, forceOnboarding);
var teleportStartupOperation = new TeleportStartupOperation(loadingStatus, realmContainer.RealmController, staticContainer.ExposedGlobalDataContainer.ExposedCameraData.CameraEntityProxy, realmContainer.TeleportController, staticContainer.ExposedGlobalDataContainer.CameraSamplingData, dynamicWorldParams.StartParcel);

var loadingOperations = new List<IStartupOperation>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ await bootstrap.InitializeFeatureFlagsAsync(bootstrapContainer.IdentityCache!.Id
applicationParametersParser,
coroutineRunner: this,
dclVersion,
destroyCancellationToken);
destroyCancellationToken,
debugSettings.ForceOnboarding);

if (!isLoaded)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class CheckOnboardingStartupOperation
private readonly IDecentralandUrlsSource decentralandUrlsSource;
private readonly IAppArgs appParameters;
private readonly IGlobalRealmController realmController;
private readonly bool forceOnboarding;

private Profile? ownProfile;
private bool isProfilePendingToBeUpdated;
Expand All @@ -36,13 +37,15 @@ public CheckOnboardingStartupOperation(
ISelfProfile selfProfile,
IDecentralandUrlsSource decentralandUrlsSource,
IAppArgs appParameters,
IGlobalRealmController realmController)
IGlobalRealmController realmController,
bool forceOnboarding)
{
this.loadingStatus = loadingStatus;
this.selfProfile = selfProfile;
this.decentralandUrlsSource = decentralandUrlsSource;
this.appParameters = appParameters;
this.realmController = realmController;
this.forceOnboarding = forceOnboarding;
}

public async UniTask MarkOnboardingAsDoneAsync(World world, Entity playerEntity, CancellationToken ct)
Expand Down Expand Up @@ -76,6 +79,9 @@ public async UniTask ExecuteAsync(CancellationToken ct) =>

private async UniTask TryToChangeToOnBoardingRealmAsync(CancellationToken ct)
{
// Check if force onboarding is enabled from app args or entry point configuration
bool shouldForceOnboarding = forceOnboarding || appParameters.HasFlag(AppArgsFlags.FORCE_ONBOARDING);

// It the app is open from any external way, we will ignore the onboarding flow
if (appParameters.HasFlag(AppArgsFlags.REALM) || appParameters.HasFlag(AppArgsFlags.POSITION) || appParameters.HasFlag(AppArgsFlags.LOCAL_SCENE))
return;
Expand All @@ -84,7 +90,7 @@ private async UniTask TryToChangeToOnBoardingRealmAsync(CancellationToken ct)
ownProfile = await selfProfile.ProfileAsync(ct);

// If the user has already completed the tutorial, we don't need to check the onboarding realm
if (ownProfile is { TutorialStep: > 0 })
if (!shouldForceOnboarding && ownProfile is { TutorialStep: > 0 })
return;

// TODO: Remove the greeting-onboarding ff when it is finally moved to production. Keep onboarding only.
Expand Down
1 change: 1 addition & 0 deletions Explorer/Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ MonoBehaviour:
enableLandscape: 0
enableLOD: 0
enableVersionUpdateGuard: 0
forceOnboarding: 0
enableEmulateNoLivekitConnection: 0
enableRemotePortableExperiences: 0
portableExperiencesEnsToLoad: []
Expand Down
Loading