Skip to content

Instantly share code, notes, and snippets.

View u-m-i's full-sized avatar

Aloof u-m-i

View GitHub Profile
@u-m-i
u-m-i / ReadOnlyAttribute.cs
Last active February 19, 2024 19:12
The all mighty ReadOnlyAttribute
using UnityEngine;
///<summary> The ReadOnly attribute for fields, allows inheritance and have its own custom drawer </summary>
public class ReadOnlyAttribute : PropertyAttribute
{}
@u-m-i
u-m-i / CustomHelpBox.cs
Last active February 19, 2024 19:04
Editor custom help box
// -----------------------
// Resources for the script:
// https://discussions.unity.com/t/having-text-or-notes-in-the-inspector/69375/7
// https://forum.unity.com/threads/helpattribute-allows-you-to-use-helpbox-in-the-unity-inspector-window.462768/
// https://forum.unity.com/threads/add-info-text-notes-into-the-inspector.265330/
// https://discussions.unity.com/t/give-info-in-inspector/47815
// https://github.com/johnearnshaw/unity-inspector-help/blob/master/HelpAttribute.cs
// https://github.com/ALanMAttano/UnityInspectorInfoTextNote/blob/master/Assets/_Scripts/Tools/Editor/InspectorNote.cs
// https://docs.unity3d.com/ScriptReference/EditorGUILayout.HelpBox.html
// ------------------------
@u-m-i
u-m-i / Binarytree.cs
Created February 17, 2024 23:32
Binary tree (Struct)
// First gist