Skip to content

Instantly share code, notes, and snippets.

View crazyshader's full-sized avatar
😉
I may be slow to respond.

crazyshader crazyshader

😉
I may be slow to respond.
  • Wuhan,China
View GitHub Profile
@jamiephan
jamiephan / README.md
Last active March 18, 2026 11:55
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@adammyhre
adammyhre / SerializableType.cs
Last active March 10, 2026 11:38
SerializableType and Supporting classes
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
[Serializable]
public class SerializableType : ISerializationCallbackReceiver {
[SerializeField] string assemblyQualifiedName = string.Empty;
public Type Type { get; private set; }
@giacomelli
giacomelli / UnityEventExtensions.cs
Last active November 6, 2021 18:25
UnityEvent Dump Log
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using UnityEngine.Events;
namespace Giacomelli.Framework
{
public static class UnityEventExtensions
{
[System.Diagnostics.Conditional("DEBUG")]
@acoppes
acoppes / AssetDatabaseExt.cs
Last active July 10, 2023 12:45
Unity Editor helper methods to get Prefabs with one or more specific components from the assets database.
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace Utils.Editor
{
public static class AssetDatabaseExt
{
@yasirkula
yasirkula / SerializedPropertyRawValueGetter.cs
Last active April 30, 2021 03:07
Get/set the raw System.Object value of a SerializedProperty in Unity 3D
using System;
using System.Collections;
using System.Reflection;
using UnityEditor;
// Credit: http://answers.unity.com/answers/425602/view.html (I've only slightly modified the code)
public static class SerializedPropertyRawValueGetter
{
public static object GetRawValue( this SerializedProperty property )
{
@jackyyang09
jackyyang09 / PositionListTool.cs
Last active February 10, 2025 14:44
Ever wanted a list of Vector3s easily accessible through Unity's inspector window?
using System.Collections.Generic;
using UnityEngine;
public class PositionListTool : MonoBehaviour
{
[SerializeField]
List<Vector3> positions = new List<Vector3>();
public List<Vector3> GetPositions()
{
@cjaube
cjaube / RenderingPipelineDefines.cs
Created May 29, 2020 02:38
Generate Unity #define directives for selected rendering pipelines.
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
[InitializeOnLoad]
public class RenderingPipelineDefines
{
enum PipelineType
@DoubleDeez
DoubleDeez / keybindings.json
Last active December 19, 2025 03:01
VSCode Visual Assist Key Bindings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+g",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "f12",
"command": "-editor.action.revealDefinition",
@yasirkula
yasirkula / UnitypackageExtractor.cs
Last active December 6, 2025 21:13
Extract a .unitypackage to any directory (even outside the project folder) from within Unity
#define STOP_EXTRACTION_WHEN_WINDOW_CLOSED
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using System.Text;
using System.Threading;
using UnityEditor;
@sinbad
sinbad / SpriteMeshRaycastFilter.cs
Last active May 11, 2023 05:35
SpriteMeshRaycastFilter: easy Unity UI non-rectangular click detector without reading textures
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
// Restrict raycasting to a sprite mesh shape
// Could use Image.alphaHitTestMinimumThreshold to mask but that requires read/write images which can't be packed
[RequireComponent(typeof(Image))]
public class SpriteMeshRaycastFilter : MonoBehaviour, ICanvasRaycastFilter {
private RectTransform rectTransform;