Skip to content

Instantly share code, notes, and snippets.

Jan v01pe

  • Broken Rules
  • Vienna
View GitHub Profile
@v01pe
v01pe / unity_templates.sh
Created Oct 23, 2018
Replace and add custom script templates for Unity
View unity_templates.sh
#!/bin/bash
#locating unity folder
if [ "$#" -gt 0 ]
then
unityFolder=${1%/}
else
unityFolder="/Applications/Unity"
fi
@v01pe
v01pe / DynamicProfilerSamplesSize.cs
Created Dec 1, 2016
In Unity add a menu item that toggles between dynamic and the default profiler sample size.
View DynamicProfilerSamplesSize.cs
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public static class DebugMenu
{
private static int defaultMaxNumberOfSamplesPerFrame = -1;
private static bool dynamicProfilerSamplesSize = false;
private const string toggleDynamicProfilerSamplesSizeName = "Debug/Dynamic Profiler Sample Size";
@v01pe
v01pe / Example.cs
Created Apr 1, 2016
A relative simple way to get the instance object from a custom property drawer that draws a serialized class inside a component
View Example.cs
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour
{
public ExampleClass example;
void Start()
{
@v01pe
v01pe / gitgit.sh
Created Apr 14, 2015
Using git on the command line, but tired of typing `git` in front of every command? Use this little script.
View gitgit.sh
#!/bin/bash
lastcmd=""
while [ true ]; do
read -r -e -p "> git " gitcmd
if [ "$gitcmd" != "" ] && [ "$gitcmd" != "$lastcmd" ]; then
lastcmd=$gitcmd
history -s "$gitcmd"
fi
if [ "$gitcmd" == "exit" ]; then
You can’t perform that action at this time.