Skip to content

Instantly share code, notes, and snippets.

View BenDevelopment's full-sized avatar

Benjamin Hoffmann BenDevelopment

  • Hoffmann
  • Strasbourg
View GitHub Profile
@yasirkula
yasirkula / SceneViewUIObjectPickerContextWindow.cs
Last active April 28, 2025 09:20
Select the UI object under the cursor via right click in Unity's Scene window
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_2021_2_OR_NEWER
using PrefabStage = UnityEditor.SceneManagement.PrefabStage;
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
@scho
scho / BindingExtensions.cs
Last active May 8, 2023 17:19
Unity UIToolkit Runtime Binding Extension
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine.UIElements;
namespace UI
{
public static class BindingExtensions
{
public static void Bind(this VisualElement element, object data)