handzlikchris / handzlikchris/FastScriptReload

Unable to compile new("option") format instead of new TMP_Dropdown.OptionData("option")

Open
#19 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
2.2k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

```
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class TmpProIssueTest : MonoBehaviour
{
// dropDown
[SerializeField] private TMP_Dropdown sortDropDown;

public void Init()
{
UnityEngine.Debug.Log("CHANGE HERE");

sortDropDown.options.Clear();
sortDropDown.options.AddRange(new List()
{
new TMP_Dropdown.OptionData("latest_order"),
new TMP_Dropdown.OptionData("old_order"),
new TMP_Dropdown.OptionData("order_of_progress"),
new TMP_Dropdown.OptionData("order_of_low_progress")
});
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the TmpProIssueTest example and compare compilation of explicit TMP_Dropdown.OptionData construction with the requested new("option") form. Trace the compiler or hot-reload path that handles this expression; done means the shorthand compiles and works for the shown dropdown options without breaking the existing form.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
compilers, game-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.