Skip to content

Instantly share code, notes, and snippets.

View keenanwoodall's full-sized avatar
🛠️
Making stuff!

Keenan Woodall keenanwoodall

🛠️
Making stuff!
View GitHub Profile
@keenanwoodall
keenanwoodall / Transform Rotation GUI
Last active March 5, 2019 10:20
A helper class for drawing a transform's rotation field in the same way as the Transform editor in Unity.
using System;
using System.Reflection;
using UnityEngine;
using UnityEditor;
/// <summary>
/// Abstracts the reflection required to use the internal TransformRotationGUI class.
/// </summary>
public class TransformRotationGUI
{
@keenanwoodall
keenanwoodall / CurveTest
Created December 29, 2018 21:13
Example script showing how to deform a mesh using a NativeCurve.
using UnityEngine;
using Unity.Jobs;
using Unity.Burst;
using Unity.Collections;
public class CurveTest : MonoBehaviour
{
public AnimationCurve curve;
private Mesh mesh;
@keenanwoodall
keenanwoodall / NativeCurve
Last active October 1, 2024 22:05
A struct that makes using animation curves with the job system easy.
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
using Unity.Collections;
using static Unity.Mathematics.math;
public struct NativeCurve : IDisposable
{
public bool IsCreated => values.IsCreated;