< Summary

Class:DCL.PointerEventsController
Assembly:DCL.Components.Events
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/UUIDEventComponentsPlugin/UUIDComponent/PointerEventsController/PointerEventsController.cs
Covered lines:147
Uncovered lines:55
Coverable lines:202
Total lines:494
Line coverage:72.7% (147 of 202)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PointerEventsController(...)0%330100%
Dispose()0%330100%
Update()0%15.7815084.85%
IsValidCurrentScene()0%220100%
GetPointerInputEvents(...)0%3.333066.67%
ResolveGenericRaycastHandlers(...)0%1101000%
UnhoverLastHoveredObject()0%110100%
RetrieveCamera()0%220100%
GetRayFromCamera()0%110100%
GetRayFromMouse()0%2100%
NeedToUnhoverWhileCursorUnlocked()0%440100%
OnButtonEvent(...)0%20.6310052.63%
IsValidButtonId(...)0%6200%
ProcessButtonUp(...)0%14.5112074.07%
ProcessButtonDown(...)0%19.6517079.07%
ReportGlobalPointerEvent(...)0%550100%
AreSameEntity(...)0%330100%
IsBlockingOnClick(...)0%440100%
EntityHasPointerEvent(...)0%440100%
AreCollidersFromSameEntity(...)0%5.025090.91%
HandleCursorLockChanges(...)0%6200%
HideOrShowCursor(...)0%110100%
SetHoverCursor()0%110100%
SetNormalCursor()0%110100%
CanRaycastWhileUnlocked()0%2.152066.67%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/UUIDEventComponentsPlugin/UUIDComponent/PointerEventsController/PointerEventsController.cs

#LineLine coverage
 1using System;
 2using DCL.Components;
 3using DCL.Configuration;
 4using DCL.Helpers;
 5using DCL.Interface;
 6using UnityEngine;
 7using UnityEngine.UI;
 8using UnityEngine.EventSystems;
 9using System.Collections.Generic;
 10using System.Linq;
 11using DCL.Controllers;
 12using DCL.Models;
 13using DCLPlugins.UUIDEventComponentsPlugin.UUIDComponent.Interfaces;
 14using MainScripts.DCL.Helpers.UIHelpers;
 15using static DCL.Interface.WebInterface.OnGlobalPointerEventPayload;
 16using Ray = UnityEngine.Ray;
 17
 18namespace DCL
 19{
 20    public class PointerEventsController
 21    {
 022        private static bool renderingEnabled => CommonScriptableObjects.rendererState.Get();
 23
 24        private readonly PointerHoverController pointerHoverController;
 25
 8526        private readonly IRaycastHandler raycastHandler = new RaycastHandler();
 8527        private readonly PointerEventData uiGraphicRaycastPointerEventData = new (null);
 8528        private readonly List<RaycastResult> uiGraphicRaycastResults = new ();
 29
 30        private readonly InputController_Legacy inputControllerLegacy;
 31        private readonly MouseCatcher mouseCatcher;
 32        private readonly BaseVariable<GraphicRaycaster> worldDataRaycaster;
 33
 8534        private DataStore_ECS7 dataStoreEcs7 = DataStore.i.ecs7;
 35
 36        private IPointerInputEvent pointerInputUpEvent;
 37        private Camera charCamera;
 38
 39        private RaycastHitInfo lastPointerDownEventHitInfo;
 40        private GraphicRaycaster uiGraphicRaycaster;
 41        private RaycastHit hitInfo;
 42
 43        private IRaycastPointerClickHandler clickHandler;
 44
 45        private StandaloneInputModuleDCL eventSystemInputModule;
 46
 110047        private StandaloneInputModuleDCL eventSystemInputModuleLazy => eventSystemInputModule ??= (StandaloneInputModule
 48
 8549        public PointerEventsController(InputController_Legacy inputControllerLegacy, InteractionHoverCanvasController ho
 50        {
 8551            this.worldDataRaycaster = worldDataRaycaster;
 8552            this.inputControllerLegacy = inputControllerLegacy;
 8553            this.mouseCatcher = mouseCatcher;
 8554            pointerHoverController = new PointerHoverController(inputControllerLegacy, hoverCanvas);
 55
 8556            pointerHoverController.OnPointerHoverStarts += SetHoverCursor;
 8557            pointerHoverController.OnPointerHoverEnds += SetNormalCursor;
 58
 238059            foreach (var actionButton in WebInterface.ConcreteActionButtons)
 110560                inputControllerLegacy.AddListener(actionButton, OnButtonEvent);
 61
 8562            RetrieveCamera();
 63
 8564            Environment.i.platform.updateEventHandler.AddListener(IUpdateEventHandler.EventType.Update, Update);
 8565            Utils.OnCursorLockChanged += HandleCursorLockChanges;
 66
 8567            HideOrShowCursor(Utils.IsCursorLocked);
 8568        }
 69
 70        public void Dispose()
 71        {
 238072            foreach (var actionButton in WebInterface.ConcreteActionButtons)
 110573                inputControllerLegacy.RemoveListener(actionButton, OnButtonEvent);
 74
 8575            pointerHoverController.OnPointerHoverStarts -= SetHoverCursor;
 8576            pointerHoverController.OnPointerHoverEnds -= SetNormalCursor;
 77
 8578            Environment.i.platform.updateEventHandler.RemoveListener(IUpdateEventHandler.EventType.Update, Update);
 8579            Utils.OnCursorLockChanged -= HandleCursorLockChanges;
 8580        }
 81
 82        private void Update()
 83        {
 1784984            if (charCamera == null)
 585                RetrieveCamera();
 86
 1784987            if (!CommonScriptableObjects.rendererState.Get() || charCamera == null)
 088                return;
 89
 1784990            if (NeedToUnhoverWhileCursorUnlocked())
 91            {
 92                // New interaction model
 110093                UnhoverLastHoveredObject();
 110094                return;
 95            }
 96
 97            // We use Physics.Raycast() instead of our raycastHandler.Raycast() as that one is slower, sometimes 2x, bec
 1674998            Ray ray = Utils.IsCursorLocked ? GetRayFromCamera() : GetRayFromMouse();
 99
 16749100            bool didHit = Physics.Raycast(ray, out hitInfo, Mathf.Infinity, PhysicsLayers.physicsCastLayerMaskWithoutCha
 101
 16749102            if (dataStoreEcs7.isEcs7Enabled)
 0103                dataStoreEcs7.lastPointerRayHit.UpdateByHitInfo(hitInfo, didHit, ray);
 104
 16749105            var uiIsBlocking = false;
 106
 107            // NOTE: in case of a single scene loaded (preview or builder) sceneId is set to null when stepping outside
 16749108            if (didHit && IsValidCurrentScene())
 109            {
 16238110                GraphicRaycaster raycaster = worldDataRaycaster.Get();
 111
 16238112                if (raycaster != null)
 113                {
 6114                    uiGraphicRaycastPointerEventData.position = Utils.IsCursorLocked ? new Vector2(Screen.width / 2, Scr
 6115                    uiGraphicRaycastResults.Clear();
 6116                    raycaster.Raycast(uiGraphicRaycastPointerEventData, uiGraphicRaycastResults);
 6117                    uiIsBlocking = uiGraphicRaycastResults.Count > 0;
 118                }
 119            }
 120
 16749121            if (!didHit || uiIsBlocking)
 122            {
 513123                clickHandler = null;
 513124                UnhoverLastHoveredObject();
 125
 513126                return;
 127            }
 128
 16236129            var raycastHandlerTarget = hitInfo.collider.GetComponent<IRaycastPointerHandler>();
 130
 16236131            if (raycastHandlerTarget != null)
 132            {
 0133                ResolveGenericRaycastHandlers(raycastHandlerTarget);
 0134                UnhoverLastHoveredObject();
 135
 0136                return;
 137            }
 138
 16236139            var target = CollidersManager.i.GetColliderInfo(hitInfo.collider, out var colliderInfo)
 140                ? colliderInfo.entity.gameObject
 141                : hitInfo.collider.gameObject;
 142
 16236143            clickHandler = null;
 144
 16236145            Type typeToUse = Utils.IsCursorLocked ? typeof(IPointerEvent) : typeof(IUnlockedCursorInputEvent);
 16236146            pointerHoverController.OnRaycastHit(hitInfo, colliderInfo, target, typeToUse);
 16236147        }
 148
 149        private static bool IsValidCurrentScene()
 150        {
 16238151            IWorldState worldState = Environment.i.world.state;
 16238152            int currentSceneNumber = worldState.GetCurrentSceneNumber();
 16238153            return currentSceneNumber > 0 && worldState.ContainsScene(currentSceneNumber);
 154        }
 155
 156        private static IList<IPointerInputEvent> GetPointerInputEvents(GameObject hitGameObject)
 157        {
 10158            if (!Utils.IsCursorLocked || Utils.LockedThisFrame())
 0159                return hitGameObject.GetComponentsInChildren<IAvatarOnPointerDown>();
 160
 10161            return hitGameObject.GetComponentsInChildren<IPointerInputEvent>();
 162        }
 163
 164        private void ResolveGenericRaycastHandlers(IRaycastPointerHandler raycastHandlerTarget)
 165        {
 0166            if (Utils.LockedThisFrame())
 0167                return;
 168
 0169            bool mouseIsDown = Input.GetMouseButtonDown(0);
 0170            bool mouseIsUp = Input.GetMouseButtonUp(0);
 171
 172            switch (raycastHandlerTarget)
 173            {
 174                case IRaycastPointerDownHandler down:
 175                {
 0176                    if (mouseIsDown)
 0177                        down.OnPointerDown();
 178
 0179                    break;
 180                }
 181                case IRaycastPointerUpHandler up:
 182                {
 0183                    if (mouseIsUp)
 0184                        up.OnPointerUp();
 185
 0186                    break;
 187                }
 188                case IRaycastPointerClickHandler click:
 189                {
 0190                    if (mouseIsDown)
 0191                        clickHandler = click;
 192
 0193                    if (mouseIsUp)
 194                    {
 0195                        if (clickHandler == click)
 0196                            click.OnPointerClick();
 197
 0198                        clickHandler = null;
 199                    }
 200
 201                    break;
 202                }
 203            }
 0204        }
 205
 206        private void UnhoverLastHoveredObject() =>
 1613207            pointerHoverController.ResetHoveredObject();
 208
 209        private void RetrieveCamera()
 210        {
 90211            if (charCamera == null)
 90212                charCamera = Camera.main;
 90213        }
 214
 215        private Ray GetRayFromCamera() =>
 16763216            charCamera.ScreenPointToRay(new Vector3(Screen.width / 2, Screen.height / 2, 0));
 217
 218        private Ray GetRayFromMouse() =>
 0219            charCamera.ScreenPointToRay(Input.mousePosition);
 220
 221        private bool NeedToUnhoverWhileCursorUnlocked() =>
 17849222            (!Utils.IsCursorLocked || Utils.LockedThisFrame()) &&
 223            (!CanRaycastWhileUnlocked() || !DataStore.i.featureFlags.flags.Get().IsFeatureEnabled("avatar_outliner"));
 224
 225        void OnButtonEvent(WebInterface.ACTION_BUTTON buttonId, InputController_Legacy.EVENT evt, bool useRaycast, bool 
 226        {
 227            // TODO(Brian): We should remove this when we get a proper initialization layer
 228
 14229            if (!EnvironmentSettings.RUNNING_TESTS)
 230            {
 0231                if (!renderingEnabled)
 0232                    return;
 233
 0234                if (NeedToUnhoverWhileCursorUnlocked())
 235                {
 236                    // New interaction model
 0237                    UnhoverLastHoveredObject();
 0238                    return;
 239                }
 240            }
 241
 14242            if (charCamera == null)
 243            {
 0244                RetrieveCamera();
 245
 0246                if (charCamera == null)
 0247                    return;
 248            }
 249
 14250            var pointerEventLayer = PhysicsLayers.physicsCastLayerMaskWithoutCharacter; // Ensure characterController is
 14251            int globalLayer = pointerEventLayer & ~PhysicsLayers.physicsCastLayerMask;
 252
 25253            if (evt == InputController_Legacy.EVENT.BUTTON_DOWN) ProcessButtonDown(buttonId, useRaycast, enablePointerEv
 6254            else if (evt == InputController_Legacy.EVENT.BUTTON_UP) ProcessButtonUp(buttonId, useRaycast, enablePointerE
 255
 14256            if (dataStoreEcs7.isEcs7Enabled && IsValidButtonId(buttonId))
 0257                dataStoreEcs7.inputActionState[(int)buttonId] = evt == InputController_Legacy.EVENT.BUTTON_DOWN;
 14258        }
 259
 260        private bool IsValidButtonId(WebInterface.ACTION_BUTTON buttonId) =>
 0261            buttonId >= 0 && (int)buttonId < dataStoreEcs7.inputActionState.Length;
 262
 263        private void ProcessButtonUp(WebInterface.ACTION_BUTTON buttonId, bool useRaycast, bool enablePointerEvent,
 264            LayerMask pointerEventLayer, int globalLayer)
 265        {
 3266            IWorldState worldState = Environment.i.world.state;
 267
 3268            int currentSceneNumber = worldState.GetCurrentSceneNumber();
 269
 3270            if (currentSceneNumber <= 0)
 0271                return;
 272
 273            RaycastHitInfo raycastGlobalLayerHitInfo;
 3274            Ray ray = !Utils.IsCursorLocked || Utils.LockedThisFrame() ? GetRayFromMouse() : GetRayFromCamera();
 275
 276            // Raycast for global pointer events
 3277            worldState.TryGetScene(currentSceneNumber, out var loadedScene);
 278
 3279            RaycastResultInfo raycastInfoGlobalLayer = raycastHandler.Raycast(ray, charCamera.farClipPlane, globalLayer,
 280                loadedScene);
 281
 3282            raycastGlobalLayerHitInfo = raycastInfoGlobalLayer.hitInfo;
 283
 3284            RaycastResultInfo raycastInfoPointerEventLayer = null;
 285
 3286            if (pointerInputUpEvent != null || dataStoreEcs7.isEcs7Enabled)
 287            {
 288                // Raycast for pointer event components
 3289                raycastInfoPointerEventLayer = raycastHandler.Raycast(ray, charCamera.farClipPlane, pointerEventLayer, l
 290            }
 291
 3292            if (pointerInputUpEvent != null && raycastInfoPointerEventLayer != null)
 293            {
 3294                bool isOnClickComponentBlocked =
 295                    IsBlockingOnClick(raycastInfoPointerEventLayer.hitInfo, raycastGlobalLayerHitInfo);
 296
 3297                bool isSameEntityThatWasPressed = AreCollidersFromSameEntity(raycastInfoPointerEventLayer.hitInfo,
 298                    lastPointerDownEventHitInfo);
 299
 6300                if (!isOnClickComponentBlocked && isSameEntityThatWasPressed && enablePointerEvent) { pointerInputUpEven
 301
 3302                pointerInputUpEvent = null;
 303            }
 304
 3305            ReportGlobalPointerEvent(InputEventType.UP, buttonId, useRaycast, raycastGlobalLayerHitInfo, raycastInfoGlob
 306
 307            // Raycast for global pointer events (for each PE scene)
 6308            foreach (string pexId in DataStore.i.Get<DataStore_World>().portableExperienceIds.Get())
 309            {
 0310                IParcelScene pexScene = worldState.GetPortableExperienceScene(pexId);
 0311                if (pexScene != null)
 312                {
 0313                    raycastInfoGlobalLayer = raycastHandler.Raycast(ray, charCamera.farClipPlane, globalLayer, pexScene)
 0314                    raycastGlobalLayerHitInfo = raycastInfoGlobalLayer.hitInfo;
 315
 0316                    ReportGlobalPointerEvent(InputEventType.UP, buttonId, useRaycast, raycastGlobalLayerHitInfo, raycast
 317                }
 318            }
 3319        }
 320
 321        private void ProcessButtonDown(WebInterface.ACTION_BUTTON buttonId, bool useRaycast, bool enablePointerEvent,
 322            LayerMask pointerEventLayer, int globalLayer)
 323        {
 11324            IWorldState worldState = Environment.i.world.state;
 325
 11326            int currentSceneNumber = worldState.GetCurrentSceneNumber();
 327
 11328            if (currentSceneNumber <= 0)
 0329                return;
 330
 11331            Ray ray = !Utils.IsCursorLocked || Utils.LockedThisFrame() ? GetRayFromMouse() : GetRayFromCamera();
 11332            worldState.TryGetScene(currentSceneNumber, out var loadedScene);
 333
 334            // Raycast for pointer event components
 11335            RaycastResultInfo raycastInfoPointerEventLayer = raycastHandler.Raycast(ray, charCamera.farClipPlane, pointe
 336
 337            // Raycast for global pointer events
 11338            RaycastResultInfo raycastInfoGlobalLayer = raycastHandler.Raycast(ray, charCamera.farClipPlane, globalLayer,
 11339            RaycastHitInfo raycastGlobalLayerHitInfo = raycastInfoGlobalLayer.hitInfo;
 340
 11341            bool isOnClickComponentBlocked =
 342                IsBlockingOnClick(raycastInfoPointerEventLayer.hitInfo, raycastGlobalLayerHitInfo);
 343
 11344            if (!isOnClickComponentBlocked && raycastInfoPointerEventLayer.hitInfo.hit.collider)
 345            {
 10346                Collider collider = raycastInfoPointerEventLayer.hitInfo.hit.collider;
 347
 348                GameObject hitGameObject;
 349
 10350                if (CollidersManager.i.GetColliderInfo(collider, out ColliderInfo info))
 10351                    hitGameObject = info.entity.gameObject;
 352                else
 0353                    hitGameObject = collider.gameObject;
 354
 10355                IList<IPointerInputEvent> events = GetPointerInputEvents(hitGameObject);
 356
 36357                for (var i = 0; i < events.Count; i++)
 358                {
 8359                    IPointerInputEvent e = events[i];
 8360                    bool areSameEntity = AreSameEntity(e, info);
 361
 8362                    switch (e.GetEventType())
 363                    {
 364                        case PointerInputEventType.CLICK:
 1365                            if (areSameEntity && enablePointerEvent)
 1366                                e.Report(buttonId, ray, raycastInfoPointerEventLayer.hitInfo.hit);
 367
 1368                            break;
 369                        case PointerInputEventType.DOWN:
 4370                            if (areSameEntity && enablePointerEvent)
 4371                                e.Report(buttonId, ray, raycastInfoPointerEventLayer.hitInfo.hit);
 372
 4373                            break;
 374                        case PointerInputEventType.UP:
 3375                            if (areSameEntity && enablePointerEvent)
 3376                                pointerInputUpEvent = e;
 377                            else
 0378                                pointerInputUpEvent = null;
 379
 380                            break;
 381                    }
 382                }
 383
 10384                lastPointerDownEventHitInfo = raycastInfoPointerEventLayer.hitInfo;
 385            }
 386
 11387            ReportGlobalPointerEvent(InputEventType.DOWN, buttonId, useRaycast, raycastGlobalLayerHitInfo, raycastInfoGl
 388
 389            // Raycast for global pointer events (for each PE scene)
 11390            IEnumerable<string> currentPortableExperienceSceneIds = DataStore.i.world.portableExperienceIds.Get();
 391
 22392            foreach (var pexSceneId in currentPortableExperienceSceneIds)
 393            {
 0394                IParcelScene pexSene = worldState.GetPortableExperienceScene(pexSceneId);
 395
 0396                if (pexSene != null)
 397                {
 0398                    raycastInfoGlobalLayer = raycastHandler.Raycast(ray, charCamera.farClipPlane, globalLayer, pexSene);
 399
 0400                    raycastGlobalLayerHitInfo = raycastInfoGlobalLayer.hitInfo;
 401
 0402                    ReportGlobalPointerEvent(InputEventType.DOWN, buttonId, useRaycast, raycastGlobalLayerHitInfo, rayca
 403                }
 404            }
 11405        }
 406
 407        private static void ReportGlobalPointerEvent(InputEventType eventType, WebInterface.ACTION_BUTTON buttonId, bool
 408            RaycastResultInfo raycastInfoGlobalLayer, int sceneNumber)
 409        {
 14410            if (useRaycast && raycastGlobalLayerHitInfo.isValid)
 411            {
 13412                CollidersManager.i.GetColliderInfo(raycastGlobalLayerHitInfo.hit.collider, out ColliderInfo colliderInfo
 413
 13414                string entityId = colliderInfo.entity != null
 415                    ? Environment.i.world.sceneController.entityIdHelper.GetOriginalId(colliderInfo.entity.entityId)
 416                    : SpecialEntityIdLegacyLiteral.SCENE_ROOT_ENTITY;
 417
 13418                WebInterface.ReportGlobalPointerEvent(eventType ,buttonId, raycastInfoGlobalLayer.ray, raycastGlobalLaye
 419                    raycastGlobalLayerHitInfo.hit.distance, sceneNumber, entityId, colliderInfo.meshName, isHitInfoValid
 420            }
 421            else
 1422                WebInterface.ReportGlobalPointerEvent(eventType, buttonId, raycastInfoGlobalLayer.ray, Vector3.zero, Vec
 1423        }
 424
 425        private static bool AreSameEntity(IPointerEvent pointerInputEvent, ColliderInfo colliderInfo) =>
 8426            pointerInputEvent != null && colliderInfo.entity != null &&
 427            pointerInputEvent.entity == colliderInfo.entity;
 428
 429        private bool IsBlockingOnClick(RaycastHitInfo targetOnClickHit, RaycastHitInfo potentialBlockerHit) =>
 14430            potentialBlockerHit.hit.collider != null // Does a potential blocker hit exist?
 431            && targetOnClickHit.hit.collider != null // Was a target entity with a pointer event component hit?
 432            && potentialBlockerHit.hit.distance <= targetOnClickHit.hit.distance // Is potential blocker nearer than tar
 433            && !AreCollidersFromSameEntity(potentialBlockerHit, targetOnClickHit); // Does potential blocker belong to o
 434
 435        private static bool EntityHasPointerEvent(IDCLEntity entity)
 436        {
 32437            var componentsManager = entity.scene.componentsManagerLegacy;
 438
 32439            return componentsManager.HasComponent(entity, CLASS_ID_COMPONENT.UUID_CALLBACK) ||
 440                   componentsManager.HasComponent(entity, CLASS_ID_COMPONENT.UUID_ON_UP) ||
 441                   componentsManager.HasComponent(entity, CLASS_ID_COMPONENT.UUID_ON_DOWN) ||
 442                   componentsManager.HasComponent(entity, CLASS_ID_COMPONENT.UUID_ON_CLICK);
 443        }
 444
 445        private bool AreCollidersFromSameEntity(RaycastHitInfo hitInfoA, RaycastHitInfo hitInfoB)
 446        {
 16447            CollidersManager.i.GetColliderInfo(hitInfoA.hit.collider, out ColliderInfo colliderInfoA);
 16448            CollidersManager.i.GetColliderInfo(hitInfoB.hit.collider, out ColliderInfo colliderInfoB);
 449
 16450            var entityA = colliderInfoA.entity;
 16451            var entityB = colliderInfoB.entity;
 452
 16453            bool entityAHasEvent = entityA != null && EntityHasPointerEvent(entityA);
 16454            bool entityBHasEvent = entityB != null && EntityHasPointerEvent(entityB);
 455
 456            // If both entities has OnClick/PointerEvent component
 16457            if (entityAHasEvent && entityBHasEvent)
 14458                return entityA == entityB;
 459
 460            // If only one of them has OnClick/PointerEvent component
 2461            if (entityAHasEvent ^ entityBHasEvent)
 0462                return false;
 463
 464            // None of them has OnClick/PointerEvent component
 2465            return colliderInfoA.entity == colliderInfoB.entity;
 466        }
 467
 468        private void HandleCursorLockChanges(bool isLocked)
 469        {
 0470            HideOrShowCursor(isLocked);
 471
 0472            if (!isLocked)
 0473                UnhoverLastHoveredObject();
 0474        }
 475
 476        private static void HideOrShowCursor(bool isCursorLocked) =>
 85477            DataStore.i.Get<DataStore_Cursor>().cursorVisible.Set(isCursorLocked);
 478
 479        private static void SetHoverCursor() =>
 18480            DataStore.i.Get<DataStore_Cursor>().cursorType.Set(DataStore_Cursor.CursorType.HOVER);
 481
 482        private static void SetNormalCursor() =>
 5483            DataStore.i.Get<DataStore_Cursor>().cursorType.Set(DataStore_Cursor.CursorType.NORMAL);
 484
 485        private bool CanRaycastWhileUnlocked()
 486        {
 1100487            if (eventSystemInputModuleLazy == null)
 1100488                return true;
 489
 0490            return mouseCatcher.IsEqualsToRaycastTarget(
 491                eventSystemInputModuleLazy.GetPointerData().pointerCurrentRaycast.gameObject);
 492        }
 493    }
 494}

Methods/Properties

renderingEnabled()
PointerEventsController(DCL.InputController_Legacy, InteractionHoverCanvasController, DCL.MouseCatcher, .BaseVariable[GraphicRaycaster])
eventSystemInputModuleLazy()
Dispose()
Update()
IsValidCurrentScene()
GetPointerInputEvents(UnityEngine.GameObject)
ResolveGenericRaycastHandlers(IRaycastPointerHandler)
UnhoverLastHoveredObject()
RetrieveCamera()
GetRayFromCamera()
GetRayFromMouse()
NeedToUnhoverWhileCursorUnlocked()
OnButtonEvent(DCL.Interface.WebInterface/ACTION_BUTTON, DCL.InputController_Legacy/EVENT, System.Boolean, System.Boolean)
IsValidButtonId(DCL.Interface.WebInterface/ACTION_BUTTON)
ProcessButtonUp(DCL.Interface.WebInterface/ACTION_BUTTON, System.Boolean, System.Boolean, UnityEngine.LayerMask, System.Int32)
ProcessButtonDown(DCL.Interface.WebInterface/ACTION_BUTTON, System.Boolean, System.Boolean, UnityEngine.LayerMask, System.Int32)
ReportGlobalPointerEvent(DCL.Interface.WebInterface/OnGlobalPointerEventPayload/InputEventType, DCL.Interface.WebInterface/ACTION_BUTTON, System.Boolean, DCL.Helpers.RaycastHitInfo, DCL.Helpers.RaycastResultInfo, System.Int32)
AreSameEntity(DCLPlugins.UUIDEventComponentsPlugin.UUIDComponent.Interfaces.IPointerEvent, DCL.Components.ColliderInfo)
IsBlockingOnClick(DCL.Helpers.RaycastHitInfo, DCL.Helpers.RaycastHitInfo)
EntityHasPointerEvent(DCL.Models.IDCLEntity)
AreCollidersFromSameEntity(DCL.Helpers.RaycastHitInfo, DCL.Helpers.RaycastHitInfo)
HandleCursorLockChanges(System.Boolean)
HideOrShowCursor(System.Boolean)
SetHoverCursor()
SetNormalCursor()
CanRaycastWhileUnlocked()