Skip to content

Instantly share code, notes, and snippets.

View FlaShG's full-sized avatar

Sascha Graeff FlaShG

View GitHub Profile
@FlaShG
FlaShG / Placr.md
Last active July 20, 2021 12:36
Placr increases your level design speed by letting you place objects quickly. https://youtu.be/nm57A2ySfIY
@FlaShG
FlaShG / CoroutinePoolThread.cs
Last active October 28, 2018 20:09
Small classes that allow for comfortably executing a single thread or a threadpool task in a coroutine.
using UnityEngine;
using System;
using System.Threading;
/// <summary>
/// Orders the Threadpool to perform an action and waits until it's done.
/// Use for short actions that maybe are performed more often.
/// </summary>
public class CoroutinePoolThread : CustomYieldInstruction
{
@FlaShG
FlaShG / FixedUpdateInterpolation.cs
Last active May 11, 2023 21:16
Interpolates a GameObject's position and rotation while being updated in FixedUpdate.
using UnityEngine;
using UnityEngine.LowLevel;
using System.Collections.Generic;
using UnityEngine.PlayerLoop;
/// <summary>
/// Interpolates a GameObject's position and rotation while being updated in FixedUpdate.
/// </summary>
public class FixedUpdateInterpolation : MonoBehaviour
@FlaShG
FlaShG / Benchmark.cs
Last active January 3, 2024 15:40
A C# Benchmark class.
using System;
using System.Diagnostics;
/// <summary>
/// Simple benchmark class to measure average time consumption of code.
/// </summary>
public static class Benchmark
{
/// <summary>
/// A benchmark's time result.
@FlaShG
FlaShG / FBXAxesFixer.cs
Last active August 29, 2015 14:16
This AssetPostprocessor switches the Y and Z axes of imported FBX files (and everything converted to FBX from Unity).
using UnityEngine;
using UnityEditor;
public class FBXAxesFixer : AssetPostprocessor
{
void OnPostprocessModel(GameObject g)
{
if(assetImporter.ToString() == " (UnityEngine.FBXImporter)")
{
FixFBXImport(g.transform, 0);