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
# 1. Change the path to Unity Editors in the path_to_unity variable below. | |
# 2. Edit the search and replace patterns in case they don't work for your version of Unity. | |
# 3. Run a command like this: python unity_dark_theme.py 2019.3.3f1 | |
# 4. In case something goes wrong, remove Unity.exe and rename Unity_bak.exe to Unity.exe. | |
import binascii | |
import shutil | |
import sys | |
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
:root { | |
--bg-color: #2e3440; | |
--bg-color-nactive: #e8e8e8; | |
--shadow-color: #404040; | |
--shadow-color-inactive: #868686; | |
--tab-surface-active-color: #94A1C0; | |
--tab-surface-active-gradient: -moz-linear-gradient(top, #A0B0CF, #7386AB) repeat-x; | |
--tab-surface-active-gradient-inactive: -moz-linear-gradient(top, #B4B4B4, #8A8A8A) repeat-x; | |
--tab-text: #e5e9f0; | |
--tab-text-inverted: #2e3440; |
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
# 1. Change the path to Unity Editors in the path_to_unity variable below. | |
# 2. Put the template you wish to use in the template_content variable. | |
# 3. Run a command like this: python unity_dark_theme.py 2019.3.3f1 | |
import sys | |
if len(sys.argv) != 2: | |
sys.exit("Provide a Unity version as an argument.") |
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 UnityEngine; | |
/// <summary> | |
/// This is a generic Singleton implementation for Monobehaviours. | |
/// Create a derived class where the type T is the script you want to "Singletonize" | |
/// Upon loading it will call DontDestroyOnLoad on the gameobject where this script is contained | |
/// so it persists upon scene changes. | |
/// </summary> | |
/// <remarks> |
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.Linq; | |
using UnityEngine; | |
/// <summary> | |
/// This is a generic implementation of MonoBehaviour that can be placed only once on a scene. | |
/// Create a derived class where the type T is the class you want to be single on the scene. | |
/// It is very similar to the Singleton pattern except the object will be destroyed when the scene is unloaded. | |
/// Methods still can be called via the static Instance property to avoid using GetComponent(). | |
/// </summary> | |
/// <typeparam name="T"> |
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; | |
/// <summary> | |
/// A class that allows to visualize the Physics2D.BoxCast() method. | |
/// </summary> | |
/// <remarks> | |
/// Use Draw() to visualize an already cast box, | |
/// and BoxCastAndDraw() to cast a box AND visualize it at the same time. | |
/// </remarks> |
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 UnityEngine.Events; | |
using Random = UnityEngine.Random; | |
namespace FIMSpace.Basics | |
{ | |
/// <summary> | |
/// Simple class which is adding physical impact on target rigidbody for provided time | |
/// </summary> | |
public class FBasic_AddPhysicalImpact : MonoBehaviour |
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
// A dictionary implementation that generates keys automatically and returns them in the Add() method. | |
// This is basically a nicely presented copy of the code snippet from this post | |
// https://stackoverflow.com/a/39104018/9833103 | |
namespace CustomDataStructures | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; |
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.Linq; | |
using System.Text.RegularExpressions; | |
public static class IdentifierExtensions | |
{ | |
// definition of a valid C# identifier: http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx | |
private const string FORMATTING_CHARACTER = @"\p{Cf}"; | |
private const string CONNECTING_CHARACTER = @"\p{Pc}"; | |
private const string DECIMAL_DIGIT_CHARACTER = @"\p{Nd}"; |
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.IO; | |
using System.Text.RegularExpressions; | |
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
internal static class RoslynDirectoryCreator | |
{ | |
static RoslynDirectoryCreator() => Application.logMessageReceived += OnLogMessageReceived; |
OlderNewer