Skip to content

Instantly share code, notes, and snippets.

@rodrigod89
rodrigod89 / ColorHexDrawer.cs
Last active June 30, 2022 20:07
Unity Custom editor: Add a Hex input field to the color picker for faster color assignment
using UnityEditor;
using UnityEngine;
// Add this under an Editor folder in the Unity project
[CustomPropertyDrawer(typeof(Color))]
public class ColorHexDrawer : PropertyDrawer
{
// Draw the property inside the given rect
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
@rodrigod89
rodrigod89 / Unity lite manifest.json
Created March 4, 2021 20:09
Lite amount of packages for a new unity project
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.ide.rider": "1.1.4",
"com.unity.ide.vscode": "1.2.1",
"com.unity.test-framework": "1.1.14",
"com.unity.textmeshpro": "2.0.1",
"com.unity.ugui": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
using UnityEditor;
using UnityEngine;
/// <summary>
/// Made by Rodrigo Diaz
/// http://www.rodrigos.work
/// This code is licensed under MIT license
///
/// Make sure to add this class under a folder named "Editor" in the Unity Project
///
@rodrigod89
rodrigod89 / AnimationClipScalerWindow.cs
Created July 28, 2016 14:48
Animation Clip scaler
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
/// <summary>
/// Made by Rodrigo Diaz
/// http://www.goldenfrogstudios.com/
/// This code is licensed under MIT license
///
/// Make sure to add this class under a folder named "Editor" in the Unity Project