This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
<DocDirectory>..\Documentation\</DocDirectory> | |
<Doxyfile>..\Doxyfile</Doxyfile> | |
</PropertyGroup> | |
<Target Name="Doxygen"> | |
<MakeDir Directories="$(DocDirectory)" /> | |
<Exec Command="doxygen.exe $(Doxyfile)" /> | |
</Target> | |
<Target Name="DoxyClean"> | |
<RemoveDir Directories="$(DocDirectory)\html" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remi Gillig - http://speps.fr - 2012 - Public domain | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DebugDraw | |
{ | |
static Material material = new Material( | |
@"Shader ""Custom/DebugDraw"" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get an event when a property changes | |
public class ObservableProperty<T> | |
{ | |
T value; | |
public delegate void ChangeEvent(T data); | |
public event ChangeEvent changed; | |
public ObservableProperty(T initialValue) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
// NOTE: Some of the classes here (namely the primitives like Vector2d and Rect2d) are not provided, | |
// but most should be fairly easy to implement yourself or replace with similar | |
// classes from other libraries. | |
// The exception is the Delaunay triangulation - that takes quite a bit more effort to implement. That said, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using System.Reflection; | |
using UnityEngine; | |
using UnityEditor; | |
public class FontSwitcher : EditorWindow | |
{ | |
[MenuItem("Font/Show Window")] | |
public static void ShowFontWindow() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[System.Serializable] | |
public class SceneObject | |
{ | |
[SerializeField] | |
private string m_SceneName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class MinMaxAttribute : PropertyAttribute | |
{ | |
public float MinLimit = 0; | |
public float MaxLimit = 1; | |
public bool ShowEditRange; | |
public bool ShowDebugValues; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Full shader example demonstrating how to use a quaterionion to rotate a vertex around a specific point. Note that this is just a plain | |
// vanilla unlit shader which includes the necessary functions (see section below) and example code in the vertex shader. | |
// | |
// Forked from https://gist.github.com/nkint/7449c893fb7d6b5fa83118b8474d7dcb | |
// Converted from GLSL to Cg. For help with that, see https://alastaira.wordpress.com/2015/08/07/unity-shadertoys-a-k-a-converting-glsl-shaders-to-cghlsl/ | |
// | |
// quaternion code from https://github.com/stackgl/gl-quat | |
// rotation from https://twistedpairdevelopment.wordpress.com/2013/02/11/rotating-a-vector-by-a-quaternion-in-glsl/ | |
Shader "Unlit/Quaternion" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.Reflection; | |
public static class EditorExtensionMethods | |
{ | |
// Public reimplmentation of extention methods and helpers that are marked internal in UnityEditor.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Unity.Jobs; | |
public static class JobHelper | |
{ |