Skip to content

Instantly share code, notes, and snippets.

@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;
@kalkuz
kalkuz / SingletonMonoBehaviour.cs
Last active September 11, 2022 22:18
Singleton MonoBehaviour class template which helps to build over when you need Singletons in Unity.
using UnityEngine;
[DisallowMultipleComponent]
public class SingletonMonoBehaviour : MonoBehaviour
{
private static SingletonMonoBehaviour m_instance;
public static SingletonMonoBehaviour Instance
{
get
{