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 / PrefabNode.cs
Created July 13, 2017 18:09
Simple nested prefab utility with editor preview.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
[CustomEditor(typeof(PrefabNode))]
public class PrefabNodeEditor
: Editor
@kalineh
kalineh / EditorMaximizeGameWindow.cs
Created April 28, 2017 18:15
Toggle game window maximized state (ctrl+M).
using UnityEditor;
using System.Reflection;
namespace FunktronicLabs
{
#if UNITY_EDITOR
public class EditorMaximizeGameWindow
{
[MenuItem("Tools/Maximize Game Window %M")]
public static void MaximizeGameWindow()
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class DebugTextHelper
: SingletonMonoBehaviourOnDemand<DebugTextHelper>
{
public abstract class MessageBase
{
public TextMesh text;
@kalineh
kalineh / git-bash-alias.sh
Last active July 25, 2022 16:50
git bash aliases
alias gs='git.exe status'
alias ga='git.exe add'
alias gd='git.exe diff'
alias gc='git.exe commit'
alias gl='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit --date=relative --branches'
alias gxx='git checkout -- "*" && git clean -fd'
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[DisallowMultipleComponent]
public class StaticBatchingHelper
: MonoBehaviour
{
public void Update()
{
using UnityEngine;
using System.Collections;
using System.Reflection;
public class SingletonMonoBehaviourOnDemand<T>
: MonoBehaviour
where T : Component
{
private static T instance;
public static T Instance
@kalineh
kalineh / MeshCombinerHelper.cs
Last active September 11, 2016 00:01
Combine multiple meshes into single mesh
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
[InitializeOnLoad()]
class MeshCombinerHelperTag
{
@kalineh
kalineh / PrefabStatusHelper.cs
Last active September 8, 2016 08:23
Show icon next to items that are prefab root objects.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
[InitializeOnLoad()]
class PrefabStatusHelper
{
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
[ExecuteInEditMode]
public class ParticlePerlinTurbulence
: MonoBehaviour
{
private ParticleSystem system;
private ParticleSystem.Particle[] particles;
@kalineh
kalineh / steambuild.sh
Created August 25, 2016 21:01
steam build helper script
working_directory=$(pwd)
cd "../Unity/MYGAME"
echo $(pwd)
git_hash=$(git rev-parse HEAD)
cd $working_directory
echo $working_directory
echo "Build Description: "
read input_description