Skip to content

Instantly share code, notes, and snippets.

@drZool
drZool / ProjectFileMod.cs
Last active March 20, 2017 14:07
Asset post processor to change .NET framework version from 3.5 to 4. and possibly mark the projects as unsafe.
//#define ALLOW_UNSAFE //Uncomment this if you need to be in unsafe mode
using System.IO;
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Text.RegularExpressions;
class ProjectFileMod : AssetPostprocessor
{
@drZool
drZool / GroupSceneObjects.cs
Last active May 7, 2019 11:00
Group selected scene objects. Place this script below a folder named "Editor"
using UnityEngine;
using System.Collections;
using UnityEditor;
public class GroupSceneObjects
{
[MenuItem("Hello/GroupSelected %g")]
static void GroupSelected(){
Transform topParent = null;
@drZool
drZool / DelayedAction.cs
Last active October 29, 2019 16:42
Delay actions. Keeps all actions in a sorted list to minimize overhead.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
/// <summary>
///
/// Delay actions. Keeps all actions in a sorted list to minimize overhead.
///
/// </summary>
@drZool
drZool / ObjectSpacing.cs
Last active October 29, 2019 16:43
Tool for aligning and distribute objects, primarly in 2d space, can be extended to 3d
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.Collections.Generic;
/// <summary>
/// Tool for spacing objects, primarly in 2d space, can be extended to 3d
/// </summary>
public class ObjectSpacing : EditorWindow
{
@drZool
drZool / IosPostBuild.cs
Created December 15, 2016 07:35
Prior 5.2.2p1 ios build would fail upload to testflight/appstore if info.plist did not have UIRequiresFullScreen = true. This fixes that
using System.IO;
using UnityEngine;
using UnityEditor;
using System.Collections;
using UnityEditor.Callbacks;
#if UNITY_IOS
using UnityEditor.iOS.Xcode;
#endif
@drZool
drZool / LerpHelper.cs
Last active April 21, 2018 08:40
This is a utility to lerp stuff over time. Feed in the time and you get normalized time and or a value of the current custom lerp.
using System;
using System.Collections;
using UnityEngine;
public struct LerpHelper<T>
{
public T from;
public T to;
public float duration;
public float start;