Skip to content

Instantly share code, notes, and snippets.

View emptybraces's full-sized avatar

{} emptybraces

View GitHub Profile
@emptybraces
emptybraces / AutoFaceSceneViewOverlay.cs
Created September 22, 2025 16:30
選択したオブジェクトが移動先を向くように回転するカスタムシーンビューオーバーレイ
namespace Emptybraces.Editor
{
using UnityEditor;
using UnityEditor.Overlays;
using UnityEditor.Toolbars;
using UnityEngine;
using UnityEngine.UIElements;
[EditorToolbarElement(ID, typeof(SceneView))]
public class AutoFaceToggle : EditorToolbarToggle
{
@emptybraces
emptybraces / BakeAtlasToPNG.cs
Last active June 10, 2025 12:45
SpriteAtlasをPNGファイルとして出力する。
using System.IO;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using UnityEngine.U2D;
namespace Editor
{
// Baking the Sprite Atlas preview image into a PNG file.
public static partial class CustomContextMenu
{
@emptybraces
emptybraces / ContextMenuSceneLoadUnload.cs
Last active August 19, 2025 01:47
ヒエラルキービューで選択しているシーン以外を一括でオープン/クローズするエディタ拡張。
namespace Emptybraces.Editor
{
using UnityEngine;
using UnityEditor;
using UnityEngine.SceneManagement;
using UnityEditor.SceneManagement;
// Editor extension that toggles the open/close state of all scenes except the one currently selected in the Hierarchy view.
internal static class ContextMenuSceneLoadUnload
{
[InitializeOnLoadMethod]