Skip to content

Instantly share code, notes, and snippets.

View alexanderameye's full-sized avatar
🦀
Learning

alexander ameye alexanderameye

🦀
Learning
View GitHub Profile
@alexanderameye
alexanderameye / ARCursor.cs
Created September 4, 2023 19:00
An AR cursor for Unity3D.
using System.Collections;
using UnityEngine;
using UnityEngine.XR.ARSubsystems;
using DG.Tweening;
[RequireComponent(typeof(ARHitProvider), typeof(ARPointCloudProvider))]
public class ARCursor : MonoBehaviour
{
public static ARCursor instance;
@alexanderameye
alexanderameye / CircularMenu.cs
Last active April 8, 2024 07:19
Circular menu for the Unity Editor
/*
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
#if UNIVERSAL_RENDERER
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using UnityEngine.Experimental.Rendering;
@alexanderameye
alexanderameye / SceneSwitcherToolbarOverlay.cs
Last active December 1, 2023 22:37
A small scene switcher utility for Unity
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Overlays;
using UnityEditor.SceneManagement;
using UnityEditor.Toolbars;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
@alexanderameye
alexanderameye / MyScriptableRendererFeature.cs
Created July 15, 2022 15:05
ScriptableRendererFeature templae
// ScriptableRendererFeature template created for URP 12 and Unity 2022.2
// Made by Alexander Ameye
// https://alexanderameye.github.io/
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public class MyScriptableRendererFeature : ScriptableRendererFeature
{
@alexanderameye
alexanderameye / VertexExtrusion.shader
Created April 13, 2021 06:49
VertexExtrusion.shader
Shader "Hidden/Vertex Extrusion"
{
Properties
{
_Color ("_Color", Color) = (1, 1, 1, 1)
_Width ("_Width", Float) = 1
_SrcBlend ("_SrcBlend", Int) = 0
_DstBlend ("_DstBlend", Int) = 0
}
@alexanderameye
alexanderameye / VertexExtrusionPass.cs
Created April 13, 2021 06:48
VertexExtrusionPass.cs
// DRAWING MODES
// OUTLINE ALWAYS: STENCIL NOTEQUAL, ZTEST ALWAYS
// HIDDEN SURFACES: STENCIL OFF, ZTEST GREATER, OUTLINE WIDTH 0
using System;
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
@alexanderameye
alexanderameye / VertexExtrusionFeature.cs
Created April 13, 2021 06:48
VertexExtrusionFeature.cs
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public enum ExtrusionMethod
{
ScaleObject,
ScaleObjectNormalized,
ExtrudeAlongNormal1,
@alexanderameye
alexanderameye / Blur.shader
Last active May 25, 2023 08:49
Two-pass box blur shader
// Two-pass box blur shader created for URP 12 and Unity 2021.2
// Made by Alexander Ameye
// https://alexanderameye.github.io/
Shader "Hidden/Blur"
{
Properties
{
_MainTex ("Texture", 2D) = "white"
}
@alexanderameye
alexanderameye / TemplateFeature.cs
Last active July 19, 2023 10:29
URP 12 ScriptableRendererFeature Template
// ScriptableRendererFeature template created for URP 12 and Unity 2021.2
// Made by Alexander Ameye
// https://alexanderameye.github.io/
using UnityEngine;
using UnityEngine.Rendering.Universal;
public class TemplateFeature : ScriptableRendererFeature
{
[System.Serializable]