Skip to content

Instantly share code, notes, and snippets.

View The-Maize's full-sized avatar
💭
I may be slow to respond.

Maize S The-Maize

💭
I may be slow to respond.
View GitHub Profile
@5argon
5argon / LerpTest.cs
Created November 16, 2017 09:54
You can use ref and your own Lerp function to beat the performance of Vector3.LerpUnclamped (Vector3.Lerp is slower than Unclamped ones)
using UnityEngine;
using UnityEditor;
using NUnit.Framework;
using System.Collections.Generic;
using System.Diagnostics;
public class TestMisc {
delegate Vector3 CustomLerp(Vector3 v1, Vector3 v2, float lerp);
delegate void CustomLerpRef(ref Vector3 v1, Vector3 v2, float lerp);
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class InternalEditorWindowsChecker : MonoBehaviour
{
/// <summary>
/// Most built-in editor windows in Unity are internal classes, so we can't access them directly.
/// However, we can work around that using Reflection.
/// The following code returns all editor window types, including internal classes (default Unity editor windows) and custom editor windows that are found in loaded assemblies.