Skip to content

Commit 346bb7f

Browse files
committed
Simplified ProfileManager property
1 parent 2973861 commit 346bb7f

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

Assets/BossRoom/Scripts/Shared/ProfileManager.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,9 @@ public static class ProfileManager
88
{
99
public const string AuthProfileCommandLineArg = "-AuthProfile";
1010

11-
static bool s_IsProfileSet = false;
11+
static string s_Profile;
1212

13-
static string s_Profile = "";
14-
15-
public static string Profile
16-
{
17-
get
18-
{
19-
if (!s_IsProfileSet)
20-
{
21-
s_Profile = GetProfile();
22-
s_IsProfileSet = true;
23-
}
24-
25-
return s_Profile;
26-
}
27-
private set => s_Profile = value;
28-
}
13+
public static string Profile => s_Profile ??= GetProfile();
2914

3015
static string GetProfile()
3116
{

0 commit comments

Comments
 (0)