Skip to content

Instantly share code, notes, and snippets.

@yasirkula
yasirkula / SlicedFilledImage.cs
Last active May 16, 2024 08:58
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

How to Use?

GUIStyle mystyle = new GUIStyle("some string from the list below");


UnityEditor.ConsoleWindow.Constants

  • "CN Box"
  • "Button"