< Summary

Class:CommonScriptableObjects
Assembly:ScriptableObjects
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ScriptableObject/CommonScriptableObjects.cs
Covered lines:31
Uncovered lines:4
Coverable lines:35
Total lines:211
Line coverage:88.5% (31 of 35)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetOrLoad[T](...)0%220100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ScriptableObject/CommonScriptableObjects.cs

#LineLine coverage
 1using DCL.CameraTool;
 2using UnityEngine;
 3
 4public static class NotificationScriptableObjects
 5{
 6    private static FloatVariable newApprovedFriendsValue;
 7    public static FloatVariable newApprovedFriends => CommonScriptableObjects.GetOrLoad(ref newApprovedFriendsValue, "Sc
 8
 9    private static FloatVariable pendingChatMessagesValue;
 10    public static FloatVariable pendingChatMessages => CommonScriptableObjects.GetOrLoad(ref pendingChatMessagesValue, "
 11
 12    private static FloatVariable pendingFriendRequestsValue;
 13    public static FloatVariable pendingFriendRequests => CommonScriptableObjects.GetOrLoad(ref pendingFriendRequestsValu
 14}
 15
 16public static class AudioScriptableObjects
 17{
 18    // Builder
 19
 20    private static AudioEvent builderEnterEvent;
 21    public static AudioEvent builderEnter => CommonScriptableObjects.GetOrLoad(ref builderEnterEvent, "ScriptableObjects
 22
 23    private static AudioEvent builderReadyEvent;
 24    public static AudioEvent builderReady => CommonScriptableObjects.GetOrLoad(ref builderReadyEvent, "ScriptableObjects
 25
 26    // Common UI
 27
 28    private static AudioEvent cameraFadeInEvent;
 29    public static AudioEvent cameraFadeIn => CommonScriptableObjects.GetOrLoad(ref cameraFadeInEvent, "ScriptableObjects
 30
 31    private static AudioEvent cameraFadeOutEvent;
 32    public static AudioEvent cameraFadeOut => CommonScriptableObjects.GetOrLoad(ref cameraFadeOutEvent, "ScriptableObjec
 33
 34    private static AudioEvent buttonHoverEvent;
 35    public static AudioEvent buttonHover => CommonScriptableObjects.GetOrLoad(ref buttonHoverEvent, "ScriptableObjects/A
 36
 37    private static AudioEvent buttonClickEvent;
 38    public static AudioEvent buttonClick => CommonScriptableObjects.GetOrLoad(ref buttonClickEvent, "ScriptableObjects/A
 39
 40    private static AudioEvent buttonReleaseEvent;
 41    public static AudioEvent buttonRelease => CommonScriptableObjects.GetOrLoad(ref buttonReleaseEvent, "ScriptableObjec
 42
 43    private static AudioEvent cancelEvent;
 44    public static AudioEvent cancel => CommonScriptableObjects.GetOrLoad(ref cancelEvent, "ScriptableObjects/AudioEvents
 45
 46    private static AudioEvent confirmEvent;
 47    public static AudioEvent confirm => CommonScriptableObjects.GetOrLoad(ref confirmEvent, "ScriptableObjects/AudioEven
 48
 49    private static AudioEvent dialogOpenEvent;
 50    public static AudioEvent dialogOpen => CommonScriptableObjects.GetOrLoad(ref dialogOpenEvent, "ScriptableObjects/Aud
 51
 52    private static AudioEvent dialogCloseEvent;
 53    public static AudioEvent dialogClose => CommonScriptableObjects.GetOrLoad(ref dialogCloseEvent, "ScriptableObjects/A
 54
 55    private static AudioEvent enableEvent;
 56    public static AudioEvent enable => CommonScriptableObjects.GetOrLoad(ref enableEvent, "ScriptableObjects/AudioEvents
 57
 58    private static AudioEvent errorEvent;
 59    public static AudioEvent error => CommonScriptableObjects.GetOrLoad(ref errorEvent, "ScriptableObjects/AudioEvents/H
 60
 61    private static AudioEvent disableEvent;
 62    public static AudioEvent disable => CommonScriptableObjects.GetOrLoad(ref disableEvent, "ScriptableObjects/AudioEven
 63
 64    private static AudioEvent fadeInEvent;
 65    public static AudioEvent fadeIn => CommonScriptableObjects.GetOrLoad(ref fadeInEvent, "ScriptableObjects/AudioEvents
 66
 67    private static AudioEvent fadeOutEvent;
 68    public static AudioEvent fadeOut => CommonScriptableObjects.GetOrLoad(ref fadeOutEvent, "ScriptableObjects/AudioEven
 69
 70    private static AudioEvent_WithPitchIncrement listItemAppearEvent;
 71    public static AudioEvent_WithPitchIncrement listItemAppear => CommonScriptableObjects.GetOrLoad(ref listItemAppearEv
 72
 73    private static AudioEvent chatReceiveGlobalEvent;
 74    public static AudioEvent chatReceiveGlobal => CommonScriptableObjects.GetOrLoad(ref chatReceiveGlobalEvent, "Scripta
 75
 76    private static AudioEvent chatReceivePrivateEvent;
 77    public static AudioEvent chatReceivePrivate => CommonScriptableObjects.GetOrLoad(ref chatReceivePrivateEvent, "Scrip
 78
 79    private static AudioEvent chatSendEvent;
 80    public static AudioEvent chatSend => CommonScriptableObjects.GetOrLoad(ref chatSendEvent, "ScriptableObjects/AudioEv
 81
 82    private static AudioEvent notificationEvent;
 83    public static AudioEvent notification => CommonScriptableObjects.GetOrLoad(ref notificationEvent, "ScriptableObjects
 84
 85    private static AudioEvent sliderValueChangeEvent;
 86    public static AudioEvent sliderValueChange => CommonScriptableObjects.GetOrLoad(ref sliderValueChangeEvent, "Scripta
 87
 88    private static AudioEvent inputFieldFocusEvent;
 89    public static AudioEvent inputFieldFocus => CommonScriptableObjects.GetOrLoad(ref inputFieldFocusEvent, "ScriptableO
 90
 91    private static AudioEvent inputFieldUnfocusEvent;
 92    public static AudioEvent inputFieldUnfocus => CommonScriptableObjects.GetOrLoad(ref inputFieldUnfocusEvent, "Scripta
 93
 94    private static AudioEvent UIHideEvent;
 95    public static AudioEvent UIHide => CommonScriptableObjects.GetOrLoad(ref UIHideEvent, "ScriptableObjects/AudioEvents
 96
 97    private static AudioEvent UIShowEvent;
 98    public static AudioEvent UIShow => CommonScriptableObjects.GetOrLoad(ref UIShowEvent, "ScriptableObjects/AudioEvents
 99
 100    private static AudioEvent tooltipPopupEvent;
 101    public static AudioEvent tooltipPopup => CommonScriptableObjects.GetOrLoad(ref tooltipPopupEvent, "ScriptableObjects
 102}
 103
 104public static class CommonScriptableObjects
 105{
 106    private static Vector3Variable playerUnityPositionValue;
 13136107    public static Vector3Variable playerUnityPosition => GetOrLoad(ref playerUnityPositionValue, "ScriptableObjects/Play
 108
 109    private static Vector3Variable playerUnityEulerAnglesValue;
 3806110    public static Vector3Variable playerUnityEulerAngles => GetOrLoad(ref playerUnityEulerAnglesValue, "ScriptableObject
 111
 112    private static Vector3Variable worldOffsetValue;
 20682113    public static Vector3Variable worldOffset => GetOrLoad(ref worldOffsetValue, "ScriptableObjects/WorldOffset");
 114
 115    private static Vector2IntVariable playerCoordsValue;
 6088116    public static Vector2IntVariable playerCoords => GetOrLoad(ref playerCoordsValue, "ScriptableObjects/PlayerCoords");
 117
 118    private static BooleanVariable playerIsOnMovingPlatformValue;
 604119    public static BooleanVariable playerIsOnMovingPlatform => GetOrLoad(ref playerIsOnMovingPlatformValue, "ScriptableOb
 120
 121    private static QuaternionVariable movingPlatformRotationDeltaValue;
 9122    public static QuaternionVariable movingPlatformRotationDelta => GetOrLoad(ref movingPlatformRotationDeltaValue, "Scr
 123
 124    private static StringVariable sceneIDValue;
 1701125    public static StringVariable sceneID => GetOrLoad(ref sceneIDValue, "ScriptableObjects/SceneID");
 126
 127    private static FloatVariable minimapZoomValue;
 11128    public static FloatVariable minimapZoom => GetOrLoad(ref minimapZoomValue, "ScriptableObjects/MinimapZoom");
 129
 130    private static Vector3NullableVariable characterForwardValue;
 18710131    public static Vector3NullableVariable characterForward => GetOrLoad(ref characterForwardValue, "ScriptableObjects/Ch
 132
 133    private static Vector3Variable cameraForwardValue;
 23983134    public static Vector3Variable cameraForward => GetOrLoad(ref cameraForwardValue, "ScriptableObjects/CameraForward");
 135
 136    private static Vector3Variable cameraPositionValue;
 12334137    public static Vector3Variable cameraPosition => GetOrLoad(ref cameraPositionValue, "ScriptableObjects/CameraPosition
 138
 139    private static Vector3Variable cameraRightValue;
 8567140    public static Vector3Variable cameraRight => GetOrLoad(ref cameraRightValue, "ScriptableObjects/CameraRight");
 141
 142    private static BooleanVariable cameraIsBlendingValue;
 5305143    public static BooleanVariable cameraIsBlending => GetOrLoad(ref cameraIsBlendingValue, "ScriptableObjects/CameraIsBl
 144
 145    private static BooleanVariable cameraBlockedValue;
 1194146    public static BooleanVariable cameraBlocked => GetOrLoad(ref cameraBlockedValue, "ScriptableObjects/CameraBlocked");
 147
 148    private static BooleanVariable playerInfoCardVisibleStateValue;
 913149    public static BooleanVariable playerInfoCardVisibleState => GetOrLoad(ref playerInfoCardVisibleStateValue, "Scriptab
 150
 151    private static BooleanVariable forcePerformanceMeterValue;
 0152    public static BooleanVariable forcePerformanceMeter => GetOrLoad(ref forcePerformanceMeterValue, "ScriptableObjects/
 153
 51232154    public static RendererState rendererState => GetOrLoad(ref rendererStateValue, "ScriptableObjects/RendererState");
 155    private static RendererState rendererStateValue;
 156
 53157    public static BooleanVariable focusState => GetOrLoad(ref focusStateValue, "ScriptableObjects/FocusState");
 158    private static BooleanVariable focusStateValue;
 159
 160    private static ReadMessagesDictionary lastReadChatMessagesDictionary;
 112161    public static ReadMessagesDictionary lastReadChatMessages => GetOrLoad(ref lastReadChatMessagesDictionary, "Scriptab
 162
 163    private static LongVariable lastReadChatMessagesValue;
 0164    public static LongVariable lastReadWorldChatMessages => GetOrLoad(ref lastReadChatMessagesValue, "ScriptableObjects/
 165
 166    private static BooleanVariable allUIHiddenValue;
 49049167    public static BooleanVariable allUIHidden => GetOrLoad(ref allUIHiddenValue, "ScriptableObjects/AllUIHidden");
 168
 169    private static BooleanVariable builderInWorldNotNecessaryUIVisibilityStatusValue;
 70170    public static BooleanVariable builderInWorldNotNecessaryUIVisibilityStatus => GetOrLoad(ref builderInWorldNotNecessa
 171
 172    private static LatestOpenChatsList latestOpenChatsValue;
 0173    public static LatestOpenChatsList latestOpenChats => GetOrLoad(ref latestOpenChatsValue, "ScriptableObjects/LatestOp
 174
 175    private static CameraMode cameraModeValue;
 10042176    public static CameraMode cameraMode => GetOrLoad(ref cameraModeValue, "ScriptableObjects/CameraMode");
 177
 178    private static BooleanVariable cameraModeInputLockedValue;
 5328179    public static BooleanVariable cameraModeInputLocked => GetOrLoad(ref cameraModeInputLockedValue, "ScriptableObjects/
 180
 181    private static BooleanVariable isProfileHUDOpenValue;
 2182    public static BooleanVariable isProfileHUDOpen => GetOrLoad(ref isProfileHUDOpenValue, "ScriptableObjects/IsProfileH
 183
 184    private static BooleanVariable isFullscreenHUDOpenValue;
 3136185    public static BooleanVariable isFullscreenHUDOpen => GetOrLoad(ref isFullscreenHUDOpenValue, "ScriptableObjects/IsAv
 186
 187    private static BooleanVariable isTaskbarHUDInitializedValue;
 7188    public static BooleanVariable isTaskbarHUDInitialized => GetOrLoad(ref isTaskbarHUDInitializedValue, "ScriptableObje
 189
 190    private static BooleanVariable tutorialActiveValue;
 147191    public static BooleanVariable tutorialActive => GetOrLoad(ref tutorialActiveValue, "ScriptableObjects/TutorialActive
 192
 193    private static BooleanVariable featureKeyTriggersBlockedValue;
 77194    public static BooleanVariable featureKeyTriggersBlocked => GetOrLoad(ref featureKeyTriggersBlockedValue, "Scriptable
 195
 196    private static BooleanVariable emailPromptActiveValue;
 0197    public static BooleanVariable emailPromptActive => GetOrLoad(ref emailPromptActiveValue, "ScriptableObjects/EmailPro
 198
 199    private static BooleanVariable voiceChatDisabledValue;
 180200    public static BooleanVariable voiceChatDisabled => GetOrLoad(ref voiceChatDisabledValue, "ScriptableObjects/VoiceCha
 201
 202    public static T GetOrLoad<T>(ref T variable, string path) where T : Object
 203    {
 237106204        if (variable == null)
 205        {
 44206            variable = Resources.Load<T>(path);
 207        }
 208
 237106209        return variable;
 210    }
 211}