ValueDropdown shows "Error, Error, ..." for strings that start with '@' or '$' characters

Issue #598 new
coffee created an issue

ValueDropdownAttribute shows Error, Error,... in dropdown list when item is string starting with @, or $.
Looks like @ at index 0 stands for evaluation, @33*2 shows 66 in dropdown. But I'd like to skip this behaviour, is there a way for a ValueDropdown?

Prefixing strings with \ (suggested solution in Discord) is not viable because it would change string values data, and error affects displaying only. Perhaps option in ValueDropdown to disable evaluation would help.

Script to reproduce:

using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
    [SerializeField]  [ValueDropdown("Ids")]
    private String Value;
    [SerializeField]
    private List<String> Ids = new List<String>{ "First", "@Second", "#Third", "$4"};
}

Using Unity2018.4.12f1 and OdinInspector v2.1.6, OSX 10.15.1

Comments (0)

  1. Log in to comment