- Home /
 
              This question was 
             closed Jul 21, 2017 at 07:48 PM by 
             osybear for the following reason: 
             
 
            Other
The current selected object?
 if(Input.GetMouseButtonDown(1))
         {
             GameObject InventoryItem = EventSystem.current.currentSelectedGameObject; //null
         }
 
               When I select a UI button with RMB the current selected gameobject return null but when its LMB it doesn't????
               Comment
              
 
               
              Kinda late but
You need to change The Get$$anonymous$$ouseButtonDown(form 1 to 0)
Cuz the 1 is for R$$anonymous$$B 2 is for $$anonymous$$$$anonymous$$B and 0 is for L$$anonymous$$B..
Follow this Question
Related Questions
DropDownlist with Checked listbox with multi select 1 Answer
UI Position Correction for worldspace UI? 1 Answer
Does Unity 5.6 free/pro provide support to open external applications inside the Unity scene? 0 Answers
Turn Another UI image on and off with a Single UI Button 1 Answer
Render non-UI object next to a UI element on Screen Space - Overlay 0 Answers