DeactivateClicking.cs - MitchOSully/Visualising-the-DFN-Dataset GitHub Wiki

Summary

This script should be attached to a GUI element, which we will denote as 'the element'. When the cursor hovers over the element, the user can no longer click on planets or meteoroids in the scene, rather, the clicks will only register on the GUI element.

List of Functions

Public Global Variables

void OnPointerEnter(PointerEventData pointerEventData)
void OnPointerExit(PointerEventData pointerEventData)

Public Global Variables

ScreenMaster screenScript

Reference to the screen script so we can alter clickingActive.

void OnPointerEnter(PointerEventData pointerEventData)

Sets clickingActive in ScreenMaster.cs to false.

Called When

The cursor first moves over the element.

void OnPointerExit(PointerEventData pointerEventData)

Sets clickingActive in ScreenMaster.cs to true.

Called When

The cursor first moves off the element.