Skip to content

Instantly share code, notes, and snippets.

CREATE OR REPLACE FUNCTION generate_sequential_uuid(p_interval_length int DEFAULT 60)
RETURNS uuid
LANGUAGE plpgsql
AS $$
DECLARE
v_i int;
v_time bigint;
v_bytes int[16] = '{}';
v_hex text[16] = '{}';
BEGIN
@shayded-exe
shayded-exe / EnemyFacade.Factory.cs
Last active February 10, 2020 20:59
Dynamic Zenject enemy prefab factory
public partial class EnemyFacade : MonoBehaviour
{
public class Factory : Factory<EnemyType, EnemyTunables, EnemyFacade> { }
}
@shayded-exe
shayded-exe / ScriptableObjectPropertyDrawer.cs
Last active September 4, 2020 15:12
Put this script in your Editor folder. Then right click on any inspector field that accepts a ScriptableObject to create an asset for it. The asset will also automatically be assigned to the field.
using System;
using System.IO;
using System.Linq;
using System.Linq.Extensions;
using UnityEditor;
using UnityEngine;
namespace PachowStudios.BadTummyBunny.Editor
{
[CustomPropertyDrawer(typeof(ScriptableObject), true)]