Skip to content

Instantly share code, notes, and snippets.

View ababilinski's full-sized avatar
🤠

Adrian Babilinski ababilinski

🤠
View GitHub Profile
@LotteMakesStuff
LotteMakesStuff / NativeMeshTest.cs
Created August 8, 2018 00:30
[NativeCollections] How to copy a regular .C# array into a NativeArray suuuuuper quick using memcpy. its about as fast as its ever gunna get!
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Mathematics;
using UnityEngine;
public class NativeMeshTest : MonoBehaviour
{
private NativeArray<float3> vertexBuffer;
private Vector3[] vertexArray;
@partlyhuman
partlyhuman / GotoScene.cs
Last active May 27, 2021 01:22
Unity Keyboard Scene Switcher
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditor.SceneManagement;
namespace com.hololabs.editor
{
public static class GotoScene
{
@partlyhuman
partlyhuman / EnumIndexedArray.cs
Created October 27, 2017 19:34
Helpful labels for serialized arrays accessed by enum types
using System;
using System.Text.RegularExpressions;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace com.hololabs
{
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 1, 2024 19:36
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Thundernerd
Thundernerd / Docker.cs
Last active January 24, 2024 09:32
Helper to dock EditorWindows
#if UNITY_EDITOR
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
public static class Docker
{
#region Reflection Types
Shader "Unlit/Unlit UV Rotation of multiple textures in vertex"
{
Properties
{
_MainTex ("Texture", 2D) = "" {}
_RotatedTexA ("Texture", 2D) = "" {}
_RotationA ("Rotation", Range(0,360)) = 0.0
_RotatedTexB ("Texture", 2D) = "" {}
_RotationB ("Rotation", Range(0,360)) = 0.0
}
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining