Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class RingColliderWindow : EditorWindow {
private GameObject _parentObj;
private int _numColliders = 6;
private float _ringRadius = 2.0f;
private float _colliderRadius = 0.5f;
using UnityEngine;
using System.Collections;
public delegate void IntDelegate(int value);
public delegate void GenericEventDelegate();
[RequireComponent(typeof(AudioSource))]
public class Metronome : Singleton<Metronome>
{
public IntDelegate SignalPhraseImmediate;
Shader "Sprites/Default with UV Noise"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_NoiseAmt ("Noise Amt", Range(0, 1)) = 0.5
_NoiseScaleX ("Noise Scale X", Float) = 1
_NoiseScaleY ("Noise Scale Y", Float) = 1
_NoiseTex ("Noise Texture", 2D) = "white" {}
@wtrebella
wtrebella / ApplyMenuTransformItem.cs
Last active August 22, 2022 06:15
This is a Unity menu item script that allows you to easily apply a transform's values to its direct children
/*
Demo video: https://i.imgur.com/bRlAHT9.mp4
This tool allows you to easily apply a transform's values to its direct children.
For example, say we have a parent object called "Starfield" that holds 100 "Star" game objects as direct children.
The Starfield's rotation is set to (x=0, y=0, z=0), and ideally you'd like to keep it that way (for some whatever reason).
But The Stars are arranged in a certain pattern, and it doesn't look right. You don't want to manually adjust
each individual Star. So you rotate the Starfield object to rotate the entire starfield itself.
@wtrebella
wtrebella / SceneHierarchyWindow.cs
Last active April 28, 2025 22:06
Scene Hierarchy Window is a Unity window that simplifies and speeds up the management of scenes that are loaded/unloaded/active in the hierarchy
// Created using Unity 2023.2, but if I'm not mistaken, this should work in older versions of Unity too
using System.Linq;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Whitakr.Utils.Editor
{