Skip to content

Instantly share code, notes, and snippets.

@th3d0g
th3d0g / Events.cs
Created August 12, 2021 20:19 — forked from wmiller/Events.cs
Unity3D Event System
using System.Collections;
using System.Collections.Generic;
public class GameEvent
{
}
public class Events
{
static Events instanceInternal = null;
@th3d0g
th3d0g / BuildDisplayer.cs
Created October 11, 2021 20:57 — forked from llamacademy/BuildDisplayer.cs
Build Incrementor Scripts from https://www.youtube.com/watch?v=PbFE0m9UMtE. If you get value from LlamAcademy, consider becoming a Patreon supporter at https://www.patreon.com/llamacademy
using TMPro;
using UnityEngine;
[RequireComponent(typeof(TextMeshProUGUI))]
public class BuildDisplayer : MonoBehaviour
{
private TextMeshProUGUI Text;
private void Awake()
{
@th3d0g
th3d0g / FileWatcher.cs
Created October 21, 2021 21:32 — forked from elringus/FileWatcher.cs
Allows executing an editor behaviour in response to file modificatons, even when editor application is not in focus.
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
/// <summary>
/// Uses file system watcher to track changes to specific files in the project directory.
@th3d0g
th3d0g / GenerateEnum.cs
Created January 27, 2022 17:06
Generate enum from editor
#if UNITY_EDITOR
using UnityEditor;
using System.IO;
public class GenerateEnum
{
[MenuItem( "Tools/GenerateEnum" )]
public static void Go()
{
string enumName = "MyEnum";
@th3d0g
th3d0g / comment-example.js
Created April 21, 2022 10:49 — forked from brandongoode/comment-example.js
Dynamoose range and hash key example
var commentSchema = new Schema({
postId: {
type: String,
hashKey: true
},
id: {
type: String,
rangeKey: true,
default: shortId.generate