Skip to content

Instantly share code, notes, and snippets.

using UnityEditor;
using System.Reflection;
using System;
public static class ConsoleUtilitiesEditor
{
[MenuItem("Tools/Clear Console %#c")] // Cmd/Ctrl + Shift + C
private static void ClearConsoleMenuItem()
{
ClearConsole();
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Random = CraftingLegends.Core.Random;
namespace CraftingLegends.Framework
{
public class RandomDungeonConnectCenters : MonoBehaviour
{
[System.Serializable]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System.IO;
using System.Reflection;
[InitializeOnLoad]
public static class ShowFileExtensions
{
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.IO;
public static class AssetFilesCounter
{
[MenuItem("Utilities/Count Asset Files")]
public static void CountAssetFiles()
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditorInternal;
#endif
/*
Basic Sprite Shader for aligning pixel art to the same grid, based on the Unity Sprite Shader.
Create one Material where you assign the same Pixels Per Unit value you use on your imported Sprites,
then reuse this Material on all appropriate Sprite Renderers.
(You can use Shader.SetGlobalFloat to set that Pixels Per Unit value for all your shaders:
https://docs.unity3d.com/ScriptReference/Shader.SetGlobalFloat.html)
This is not for scaled or rotated artwork. If you need those features, look at low res render textures.
Use this however you want.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
public static class PivotUtilities
{
[MenuItem("GameObject/Pivot/Create Pivot", false, 0)]
static void CreatePivotObject()
{
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
public class ColorToCSharp : EditorWindow
{
[SerializeField]
private bool _usedColorPickerOnce = false;
using UnityEngine;
using UnityEditor;
using System.IO;
// example PostProcessor for adjusting automatic Sprite Import settings
// save this in any "Editor" Folder
public class SpriteImportProcessor : AssetPostprocessor
{
void OnPostprocessSprites(Texture2D texture, Sprite[] sprites)
{
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Random = UnityEngine.Random;
public class #SCRIPTNAME# : MonoBehaviour
{
void Start()
{