Skip to content

Instantly share code, notes, and snippets.

View kalineh's full-sized avatar

kalineh

  • Funktronic Labs
  • Pasadena, CA
View GitHub Profile
@kalineh
kalineh / EditorEnumDrawer.cs
Created February 12, 2019 01:28
EditorEnumDrawer.cs
using System;
using System.Reflection;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
public class EnumPickerWindow
@kalineh
kalineh / PortraitRender.cs
Created January 9, 2019 06:36
PortraitRender.cs
private void RenderPortrait()
{
if (regiment == null)
return;
// TODO: portrait to config
var first = regiment.xGetFirstNonNullUnit();
if (first == null)
return;
@kalineh
kalineh / TweakValues.cs
Created August 18, 2018 00:29
TweakValues.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
using Sirenix;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
@kalineh
kalineh / Airfoil.cs
Created June 29, 2018 23:54
Airfoil.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class Airfoil
: MonoBehaviour
{
[Range(0.0f, 5.0f)]
public float liftCoefficient = 1.0f;
@kalineh
kalineh / MeshCombinerNew.cs
Created April 9, 2018 23:44
MeshCombinerNew.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
[InitializeOnLoad()]
class MeshCombinerHelperTag
Pass
{
CGPROGRAM
#pragma multi_compile_instancing
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
@kalineh
kalineh / EditorTimeScale.cs
Created October 31, 2017 07:22
EditorTimeScale.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class EditorTimeScale
: EditorWindow
{
[MenuItem("Tools/TimeScale &T")]
public static void TimeScale()
@kalineh
kalineh / DebugMeshGizmo.cs
Created September 27, 2017 00:54
DebugMeshGizmo.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
// NOTES
// - DrawMesh() doesn't clear batches
// - DrawMeshNow() can have weird lighting behind some transparent things
// - EditorUtility.SetDirty() can be used to force batch clear for DrawMesh() if you have to use it
// - DrawGizmos() is called in addition to DrawGizmosSelected()
@kalineh
kalineh / vs2017.vssettings
Created September 15, 2017 21:51
vs2017.vssettings
<UserSettings><ApplicationIdentity version="15.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"><ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"><PropertyValue name="ShowMiscFilesProject">false</PropertyValue><PropertyValue name="AutoloadExternalChanges">false</PropertyValue><PropertyValue name="CheckForConsistentLineEndings">false</PropertyValue><PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue><PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue><PropertyValue name="ReuseSavedActiveDocWindow">false</PropertyValue><PropertyValue name="DetectFileChangesOutsideIDE">true</PropertyValue><PropertyValue name="DontShowGlobalUndoChangeLossDialog">true</PropertyValue><PropertyValue name="AllowEditingReadOnlyFiles">true</PropertyValue><PropertyValue name="DocumentDockPreference">0</PropertyValue><PropertyValue name="MiscFilesProjectSavesLastNItems">0</PropertyValu
@kalineh
kalineh / EditorQuickFind.cs
Created September 9, 2017 17:44
EditorQuickFind.cs
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
namespace FunktronicLabs
{
public class EditorQuickFindAssetNameCache