Question by 
               DryRope · Jan 27, 2020 at 06:42 PM · 
                onmouseover  
              
 
              !Onmouseover
Hey! I need help with Onmouseover script How could I make Onmouseover like reversed (Like !Onmouseover or Onmouseover = false) kinda thing?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Hellium · Jan 27, 2020 at 09:33 PM
 using UnityEngine;
 using UnityEngine.EventSystems;
 using System.Collections;
 
 public class ExampleClass : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
 {
     private bool hovered = false;
 
     public void OnPointerEnter(PointerEventData pointerEventData)
     {
         hovered = true;
     }
 
     public void OnPointerExit(PointerEventData pointerEventData)
     {
         hovered = false;
     }
 
     void Update()
     {
         if(!hovered)
         {
             Debug.Log("Not hovered");
         }
     }
 }
This script must be attached on the object with the collider.
Don't forget to have a PhysicsRaycaster on the camera and an Event System with an InputModule in your scene.
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                