🏴☠️
This file contains hidden or 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 Unity.Collections; | |
| using Unity.Jobs; | |
| using Unity.Mathematics; | |
| using BurstCompile = Unity.Burst.BurstCompileAttribute; | |
| [BurstCompile] public unsafe struct NoSimd : IJob | |
| { | |
| public float a, b; | |
| public float* c; | |
| void IJob.Execute () { *c = a * b; } |
This file contains hidden or 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/bc05310efcb1bcb2875a376494414f36 | |
| using Unity.Collections; | |
| using Unity.Collections.LowLevel.Unsafe; | |
| public interface INativeMinHeapComparer<I,V> | |
| where I : unmanaged | |
| where V : unmanaged | |
| { | |
| int Compare ( I lhs , I rhs , NativeSlice<V> comparables ); | |
| } |
This file contains hidden or 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; |
This file contains hidden or 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/d38a11bf0559a723617b9deaeedb2eac | |
| using UnityEngine; | |
| using UnityEngine.UIElements; | |
| public static class ExtensionMethods_UIToolkit | |
| { | |
| public static T For<T>(this VisualElement root, string name, System.Action<T> action, params string[] classes) | |
| where T : VisualElement | |
| { |











