Skip to content

Instantly share code, notes, and snippets.

@cdr9042
cdr9042 / RoadSegmentDataDrawer.cs
Created May 8, 2024 06:47
Use SearchablePopupContent to show a popup with a search field input, a TreeView containing the options will be populated using parameter string[] data. Example of usage is in RoadSegmentDataDrawer.
using JacatGames.ShapeShifting;
using UnityEditor;
using UnityEngine;
namespace JacatGames.ShapeShifting
{
[CustomPropertyDrawer(typeof(RoadSegmentData))]
public class RoadSegmentDataDrawer : PropertyDrawer
{
// You can define your dropdown options here