We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ac2774 commit 8adc0d1Copy full SHA for 8adc0d1
Assets/MixedRealityToolkit/_Core/Utilities/CameraCache.cs
@@ -16,17 +16,7 @@ public static class CameraCache
16
/// <summary>
17
/// Returns a cached reference to the main camera and uses Camera.main if it hasn't been cached yet.
18
/// </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
+ public static Camera Main => cachedCamera == null ? Refresh(Camera.main) : cachedCamera;
30
31
32
/// Set the cached camera to a new reference and return it
0 commit comments