Skip to content

Instantly share code, notes, and snippets.

View SimpleManGames's full-sized avatar

Riley Smith SimpleManGames

View GitHub Profile
@somedeveloper00
somedeveloper00 / SecureDateTime.cs
Last active May 17, 2023 14:51
time sync from internet with additional options for modularizing
using System;
using System.Globalization;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
@seekeroftheball
seekeroftheball / ObjectPool.cs
Created April 26, 2023 13:32
An object pool that uses multithreading to handle concurrent access to the pool.
//Author : https://github.com/seekeroftheball https://gist.github.com/seekeroftheball
//Version : 1.0
//Updated : April 2023
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
/// <summary>
@jschieck
jschieck / FlyoutProjectWindow.cs
Last active March 2, 2024 12:43
Show a flyout project window in the scene view
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.Compilation;
using UnityEngine;
public static class FlyoutProjectWindow
{
@TheCherno
TheCherno / Instrumentor.h
Last active November 2, 2025 20:14
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
@marcosecchi
marcosecchi / MenuItemGenerator.cs
Last active January 30, 2024 10:24
Generating menu items at runtime in Unity
using UnityEngine;
using UnityEditor;
using System.Text;
namespace TheBitCave {
public class MenuItemGenerator {
/// <summary>
/// Generates a list of menuitems from an array
/// </summary>
@jbevain
jbevain / ReferenceRemovalProjectHook.cs
Created November 26, 2014 13:15
Project Generation Hook to remove references to Boo.Lang and UnityScript assemblies
using System;
using UnityEngine;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
[InitializeOnLoad]
public class ReferenceRemovalProjectHook
{