Skip to content

Instantly share code, notes, and snippets.

View jacobfdunbar's full-sized avatar

Jacob Dunbar jacobfdunbar

View GitHub Profile
@jacobfdunbar
jacobfdunbar / .gitignore
Last active February 25, 2024 15:01
Grimbar Interactive Unity .gitignore
# This .gitignore file should be placed at the root of your Unity project directory
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
@jacobfdunbar
jacobfdunbar / ExampleNonUIMonoBehaviour.cs
Created January 26, 2023 16:47 — forked from NickMercer/ExampleNonUIMonoBehaviour.cs
UIToolkitRaycastChecker is a script for Unity UIElements to replicate the EventSystem.current.IsPointerOverGameObject() functionality for UI Elements.
using UnityEngine;
public class ExampleNonUIMonoBehaviour : MonoBehaviour
{
private void Start()
{
//Example of how to check for a position. This is the equivalent of EventSystem.current.IsPointerOverGameObject() except for UI Elements.
if (UIToolkitRaycastChecker.IsPointerOverUI())
{
//I'm under a part of the UI that's set to block raycasts! Don't try to raycast or something.