This file contains 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
#define DEBUG_CONSOLE | |
#define DEBUG_LEVEL_LOG | |
#define DEBUG_LEVEL_WARN | |
#define DEBUG_LEVEL_ERROR | |
#if (UNITY_EDITOR || DEVELOPMENT_BUILD) | |
#define DEBUG | |
#endif | |
#if (UNITY_IOS || UNITY_ANDROID) |
This file contains 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
// Drop this script in the Editor directory in your project (creating the Editor directory if it's not there yet) | |
// Then re-import the assets in the directories covered by this script (right click and reimport) | |
// | |
// I would replace my path checking with the path checking from this gist: | |
// https://gist.github.com/1842177 | |
// | |
// The texture settings for icons might want to use some of his settings combined with mine as well | |
using UnityEngine; |
This file contains 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
// This file is in the public domain. Where | |
// a public domain declaration is not recognized, you are granted | |
// a license to freely use, modify, and redistribute this file in | |
// any way you choose. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// Unity remake of a fake volumetric light glow effect |
This file contains 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
//int vesioncode = context().getPackageManager().getPackageInfo(context().getPackageName(), 0).versionCode; | |
public static int GetVersionCode() { | |
AndroidJavaClass contextCls = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
AndroidJavaObject context = contextCls.GetStatic<AndroidJavaObject>("currentActivity"); | |
AndroidJavaObject packageMngr = context.Call<AndroidJavaObject>("getPackageManager"); | |
string packageName = context.Call<string>("getPackageName"); | |
AndroidJavaObject packageInfo = packageMngr.Call<AndroidJavaObject>("getPackageInfo", packageName, 0); | |
return packageInfo.Get<int>("versionCode"); | |
} | |
This file contains 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; | |
using System.Collections; | |
namespace UnityEngine { | |
/// <summary> | |
/// Usage: | |
/// | |
/// (optional) Call GUIScaler.Initialize() in Start(), Awake() or OnEnable() (only needed once) | |
/// Call GUIScaler.Begin() at the top of your OnGUI() methods | |
/// Call GUIScaler.End() at the bottom of your OnGUI() methods |
This file contains 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.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class MaterialGradientDrawer : MaterialPropertyDrawer { | |
private int resolution; |
This file contains 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
/* ************************************************************************** | |
Copyright 2012 Calvin Rien | |
(http://the.darktable.com) | |
Derived from a method in BuildManager, part of | |
VoxelBoy's Unite 2012 Advanced Editor Scripting Talk. | |
(http://bit.ly/EditorScripting) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. |
This file contains 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
/* ************************************************************************** | |
Copyright 2012 Calvin Rien | |
(http://the.darktable.com) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using DB = UnityEngine.Debug; | |
public class SelectWithLayer : ScriptableObject { | |
static void SelectLayer(int layerNum) { | |
var objs = Selection.GetFiltered(typeof(GameObject), SelectionMode.Deep); |
This file contains 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.IO; | |
using System.Runtime.CompilerServices; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Events; | |
/// <summary> | |
/// Hierarchy Window Group Header | |
/// http://diegogiacomelli.com.br/unitytips-changing-the-style-of-the-hierarchy-window-group-header/ |