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
import glob | |
import os | |
import re | |
import ntpath | |
import sys | |
import argparse | |
from typing import List | |
# Example how this script can be called: | |
# python this-script.py --fileExtensions "txt" --prepend --onlyIfNew --ignorePathRegEx ".*ignore-me.*" --text "Hello {filename}!{newline}" |
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.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
using UnityEditor.SceneManagement; | |
using System.Linq; | |
using System; | |
using System.Globalization; | |
public class SceneListEditorWindow : EditorWindow |
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
import java.io.File; | |
import java.util.HashMap; | |
import java.util.stream.Collectors; | |
/** | |
* Execute via `java --source 11 "CountFilesRecursive.java" "path/to/folder"` | |
*/ | |
public class CountFilesRecursive { | |
private static final String DEFAULT_FOLDER_PATH = "C:/Users/andi/Desktop"; |
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.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
// Editor Script to move parent RectTransform without affecting position and size (width / height) of child RectTransforms | |
// Note however that (in this version of the script) the anchor positions are lost. | |
// Tested with Unity 2019.02 | |
[InitializeOnLoad] | |
public static class MoveParentWithoutAffectingChildren |
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 UnityEditor; | |
using UnityEngine; | |
public static class CornersToAnchorsMenuItems | |
{ | |
// Hotkey: Alt+C | |
[MenuItem("Tools/Corners to Anchors (RectTransform)/Width and Height and Position &c")] |
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; | |
// Mimics several fields of a RectTransform for easier editing in the Inspector. | |
// Some of these fields are sometimes unavailable in the normal Inspector for a RectTransform. | |
// Notably the absolute size of a RectTransform can be set much more easily with this helper. | |
[RequireComponent(typeof(RectTransform))] | |
[ExecuteInEditMode] | |
public class RectTransformHelper : MonoBehaviour | |
{ | |
// Fields of the RectTransform |