Skip to content

Instantly share code, notes, and snippets.

View MrBelarus's full-sized avatar
🐈

Vladislav MrBelarus

🐈
  • Belarus, Minsk
  • 15:48 (UTC +03:00)
View GitHub Profile
@alexanderameye
alexanderameye / CircularMenu.cs
Last active April 28, 2025 08:27
Circular menu for the Unity Editor
/*
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@yasirkula
yasirkula / SlicedFilledImage.cs
Last active May 15, 2025 04:04
Combining UI Image's Sliced+Filled features together in Unity
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
@yasirkula
yasirkula / GradientGraphic.cs
Last active March 2, 2025 21:47
Create 4-color gradient UI graphics in Unity
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Sprites;
using UnityEngine.UI;
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER
using UnityEngine.U2D;
#endif
using Sprites = UnityEngine.Sprites;
#if UNITY_EDITOR
@yasirkula
yasirkula / CircleGraphic.cs
Last active March 2, 2025 21:47
Create circles/ellipses in Unity UI system in one of three modes: FillInside, FillOutside and Edge.
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
// Custom Editor to order the variables in the Inspector similar to Image component
[CustomEditor( typeof( CircleGraphic ) ), CanEditMultipleObjects]
public class CircleGraphicEditor : Editor
{
@MattDahEpic
MattDahEpic / SerializableQuaterion.cs
Last active February 12, 2024 15:00
Serializable Vector3 and Quaterions for Unity
using UnityEngine;
using System;
using System.Collections;
[System.Serializable]
public struct SerializableQuaternion {
public float x;
public float y;
public float z;
public float w;