Skip to content

Instantly share code, notes, and snippets.

@Eraile
Eraile / SceneViewUILayerToggle.cs
Created October 15, 2024 04:59
Editor script to toggle on/off the "UI" layer when switching Unity Editor's scene view perspective (2D to 3D)... To avoid the huge UI flying over your 3D work
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public static class SceneViewUILayerToggle
{
// Define the UI layer's mask
private static readonly int uiLayerMask = 1 << LayerMask.NameToLayer("UI");
// Constructor to initialize the script
@Eraile
Eraile / SplineFollower.cs
Created July 24, 2023 10:16
Spline Follower for Unity, based on Unity's official Spline package
/*
* Spline Follower for Unity, based on Unity's official Spline package
*
* Developed by Pierre Mercy
* Assisted by OpenAI's GPT-4 Language Model (ChatGPT)
*
* This script allows an object to follow a spline path in Unity.
* It includes various features like speed control, time-based motion, loop, ping pong, and ease in and out functionality.
*
* The script was developed using Unity 2022 and the Splines 2.3.0 package.