This file contains hidden or 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 UnityEditor; | |
using Yarn.Unity; | |
using System.Collections.Generic; | |
using System.IO; | |
class YarnAssetPostProcessor : AssetPostprocessor | |
{ | |
private const string ScriptFolder = "Assets/Yarn/"; | |
private static readonly string _filePath = ScriptFolder + "YarnNodesRef.cs"; |
This file contains hidden or 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 UnityEditor; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class SnapUtils | |
{ | |
[MenuItem("Tools/Megasnap")] | |
private static void Snap() | |
{ | |
GameObject[] rootObjects = SceneManager.GetSceneAt(0).GetRootGameObjects(); |
This file contains hidden or 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.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEditor.SceneManagement; | |
using UnityEngine.SceneManagement; | |
/** | |
* Use this utility to replace one sprite with another across all scenes. | |
* This can be easily extended for other types as well (AudioClip, Material, etc...) | |
*/ |
This file contains hidden or 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
public static class MyLogger | |
{ | |
public const int LOG_TYPE_1 = 1; | |
public const int LOG_TYPE_2 = 2; | |
public const int LOG_TYPE_3 = 4; | |
public static int Flags = 1; // Bit flags to turn individual log types on/off | |
[System.Diagnostics.Conditional("DEBUG")] // All calls to this method will be stripped when compiling without the DEBUG symbol | |
public static void Log(string msg, int type = 0) |
This file contains hidden or 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 System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
public class MarkUnused | |
{ | |
private const string UnusedLabel = "Unused"; // All unused assets will be tagged with this label |
This file contains hidden or 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 UnityEditor; | |
using System.Text.RegularExpressions; | |
/* | |
This script gives you the option to assign assets to asset bundles based on the file names. | |
Change the string constants below to fit your needs | |
*/ | |
public class AssetBundlesUtils | |
{ |
This file contains hidden or 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 UnityEditor; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
class BooPostprocessor : AssetPostprocessor | |
{ | |
void OnPreprocessTexture() // called when a new texture is added or when you click Apply in texture importer inspector | |
{ | |
TextureImporter textureImporter = (TextureImporter)assetImporter; | |
textureImporter.spritePixelsPerUnit = Random.Range(1, 100); |
This file contains hidden or 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
package cz.fishtrone.utils | |
{ | |
import starling.display.Image; | |
import starling.textures.Texture; | |
/** | |
* Give a texture that is made of {parts} images, one below another, spaced evenly and specify which image {part} you want to see | |
*/ | |
public class MultipartImage extends Image |