Skip to content

Commit 8adc0d1

Browse files
converted expression to C# 4 language
1 parent 8ac2774 commit 8adc0d1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Assets/MixedRealityToolkit/_Core/Utilities/CameraCache.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,7 @@ public static class CameraCache
1616
/// <summary>
1717
/// Returns a cached reference to the main camera and uses Camera.main if it hasn't been cached yet.
1818
/// </summary>
19-
public static Camera Main
20-
{
21-
get
22-
{
23-
if (cachedCamera == null)
24-
{
25-
return Refresh(Camera.main);
26-
}
27-
return cachedCamera;
28-
}
29-
}
19+
public static Camera Main => cachedCamera == null ? Refresh(Camera.main) : cachedCamera;
3020

3121
/// <summary>
3222
/// Set the cached camera to a new reference and return it

0 commit comments

Comments
 (0)