Skip to content

Instantly share code, notes, and snippets.

@supermeowva
supermeowva / MyFlagEnum.cs
Last active March 31, 2026 15:30
C# Flag Enum Cheat Sheet
[System.Flags]
public enum MyFlagEnum
{
None = 0,
A = 1, // = 1 << 0, // 000001
B = 2, // = 1 << 1, // 000010
C = 4, // = 1 << 2, // 000100
D = 8, // = 1 << 3, // 001000
E = 16, // = 1 << 4, // 010000
}
using System;
using System.Collections.Generic;
using Unity.Burst;
using Unity.Collections;
using Unity.Mathematics;
namespace UnityEngine.Animations.Rigging
{
/// Jiggle Chain constraint as presented at GDC2019
/// "Introducing the New Animation Rigging Features" - Unity Developer Day