List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
| using System.Reflection; | |
| using TMPro; | |
| using UnityEngine; | |
| using UnityEngine.Localization; | |
| /// <summary> | |
| /// Sets the default TextMeshPro font to be used. | |
| /// </summary> | |
| [ExecuteInEditMode] | |
| public class DefaultTmpFont : MonoBehaviour |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // | |
| // _____ _ _____ | |
| // |_ _|_|___ _ _ |_ _|_ _ _ ___ ___ ___ | |
| // | | | | | | | | | | | | | -_| -_| | | |
| // |_| |_|_|_|_ | |_| |_____|___|___|_|_| | |
| // |___| | |
| // A Complete and Easy to use Tweens library in One File | |
| // | |
| // Basic use: |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.Playables; | |
| namespace Needle.AnimationUtils | |
| { | |
| public class VisualizeMotionTrajectories : MonoBehaviour |
| using System.Linq; | |
| using UnityEngine; | |
| [RequireComponent(typeof(AudioSource))] | |
| public class AudioVisualizer : MonoBehaviour | |
| { | |
| [SerializeField] private float barWidth = 0.1f; | |
| [SerializeField] private float updateDelay = 0.04f; | |
| [SerializeField] private Color[] barColors; | |
| [SerializeField] private float barMultiplier = 2f; |
| /* | |
| Copyright (c) 2022 Omid Saadat | |
| Licensed under the MIT License (Do whatevever you want with this!); | |
| */ | |
| using UnityEngine; | |
| using UnityEditor; | |
| public class ObjectActivationSwitch : EditorWindow | |
| { | |
| [MenuItem("LeMoonade/ObjectActivationSwitch")] |
| /* | |
| A simple little editor extension to copy and paste all components | |
| Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html | |
| license: WTFPL (http://www.wtfpl.net/) | |
| author: aeroson | |
| advise: ChessMax | |
| editor: frekons | |
| */ | |
| #if UNITY_EDITOR |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| using UnityEditor; | |
| using UnityEditorInternal; | |
| using UnityEngine; | |
| /// <summary> | |
| /// Uses file system watcher to track changes to specific files in the project directory. |
| // Source: https://gist.github.com/Z4urce/e1719b3c1641537ced54da24d911f0b0 | |
| // Moves the Content transform so the current selected object will be inside the Viewport rect | |
| using UnityEngine; | |
| using UnityEngine.EventSystems; | |
| namespace Utils | |
| { | |
| public sealed class ScrollToSelectionBehaviour : MonoBehaviour | |
| { |
| using System; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| #if UNITY_2017_4 || UNITY_2018_2_OR_NEWER | |
| using UnityEngine.U2D; | |
| #endif | |
| using Sprites = UnityEngine.Sprites; | |
| #if UNITY_EDITOR |