// Update is called once per frame void Update() { if (Active_UIElements._obj.GetActiveElementParent() != null && Active_UIElements._obj.GetActiveUIElement() != null) { if (Input.GetMouseButtonDown(0)) { var rayCast = new RayCasts(); if (Active_UIElements._obj.GetModelObj()) { if (!rayCast.GraphicRaycast("UIElment_Dynamic_ModelObj(Clone)", GetComponent <EventSystem>())) { DestroyUIElement("UIElment_Dynamic_ModelObj(Clone)"); } } if (Active_UIElements._obj.GetInteriorObj()) { if (!rayCast.GraphicRaycast("UIElment_Dynamic_InteriorObj(Clone)", GetComponent <EventSystem>())) { DestroyUIElement("UIElment_Dynamic_InteriorObj(Clone)"); } } } } }
// Update is called once per frame void Update() { if (Interface._obj.GetPanelActive()) { if (Input.GetMouseButtonDown(0)) { var rayCast = new RayCasts(); if (!rayCast.GraphicRaycast(Interface._obj.GetActivePanelName(), GetComponent <EventSystem>())) { DisablePanel(Interface._obj.GetActivePanelName()); } } } }
// Update is called once per frame void Update() { if (Interface._obj.GetObjInfoPanelState()) { if (Input.GetMouseButtonDown(0)) { RayCasts rayCasts = new RayCasts(); if (!rayCasts.GraphicRaycast("Object_Info", GetComponent <EventSystem>())) { Interface._obj.GetClassRefrence_UPV().GetObjectInfo().SetActive(false); Interface._obj.SetObjInfoPanelState(false); } } } }