- Home /
One EventSystem for 'physical' objects and one for UI ?
Hi,
I want to be able to select a 'physical' object in my scene (a player, a building, ...) and then display (and interact with) a UI (both with the mouse pointer).
Right now i use the EventSystem, InputSystemUIInputModule, PhysicsRaycaster, Selectable and a GraphicRaycaster on my UI Canvas. This works for selecting an object in the scene (and displaying the UI in the OnSelect method of that object).
But when I click the UI, that object in the scene gets deselected and the UI disappears (through the OnDeselect method) (which makes sense).
I'm not sure what the normal way of achieving this is. Shouldn't i use the EventSystem for selecting those objects ? (It works perfectly for it tho) Can I use 2 EventSystems ? One for objects in the scene and one for UI ?
Thanks in advance
Your answer
![](https://koobas.hobune.stream/wayback/20220613000518im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do disable uGUI/EventSystem selection feature? 0 Answers
What's the difference between Selectable.Select() and EventSystem.current.SetSelectedGameObject()? 0 Answers
Text gets hidden on frames where other text is behind it 1 Answer
Canvas UI Priority layers 1 Answer
IPointer Events don't seem to be working 3 Answers