🏴☠️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SOURCE: https://gist.github.com/andrew-raphael-lukasik/60e6dc072dc170ab535a7aff961c3ba9 | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
//TODO: Add build-time warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace SevenZip.Compression.LZMA | |
{ | |
public static class SevenZipHelper | |
{ | |
static int dictionary = 1 << 23; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Unity.Collections; | |
using Unity.Mathematics; | |
public class DynamicMeshData : System.IDisposable | |
{ | |
#region FIELDS & PROPERTIES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CoroutineController : MonoBehaviour | |
{ | |
static CoroutineController _singleton; | |
static Dictionary<string,IEnumerator> _routines = new Dictionary<string,IEnumerator>(100); | |
[RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.BeforeSceneLoad )] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int2[] ToEdges ( int[] triangles ) | |
{ | |
var edges = new Dictionary<ulong,int2>(); | |
for( int i=0 ; i<triangles.Length ; i+=3 ) | |
{ | |
int a = triangles[i]; | |
int b = triangles[i+1]; | |
int c = triangles[i+2]; | |
ulong hash; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src*: https://gist.github.com/andrew-raphael-lukasik/09c8a9c29bb5548ea65273653474f8f1 | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
public unsafe struct VeryUnsafeList <T> : System.IDisposable where T : unmanaged | |
{ | |
public T* ptr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src* = https://gist.github.com/andrew-raphael-lukasik/b1cba7b10407c7540e33f1c0a9930746 | |
using UnityEngine; | |
public struct Array2DView <T> | |
{ | |
public T[] array; | |
public int width, height; | |
public T this [ int i ] | |
{ | |
get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src* https://gist.github.com/andrew-raphael-lukasik/7229d38dbbc0baa3c2a2ab106fb4f7ef | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
[UnityEngine.Scripting.Preserve] | |
public class LineSegmentDrawer : VisualElement | |
{ | |
public float startX { get; set; } | |
public float startY { get; set; } | |
public float endX { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SOURCE: https://gist.github.com/andrew-raphael-lukasik/36a30f0955d7cdc758e394dc4e7266bf | |
using System.Collections; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.Build; | |
public class IncreaseBuildNumberAutomatically : IPreprocessBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src: https://gist.github.com/andrew-raphael-lukasik/709c19dd2305a2d1a0fa32ee82717b5c | |
using Unity.Collections; | |
public unsafe struct NativeStack <T> : System.IDisposable | |
where T : unmanaged | |
{ | |
NativeList<T> _list; | |
public bool IsCreated => _list.IsCreated; | |
public int Length => _list.Length; |
OlderNewer