> For the complete documentation index, see [llms.txt](https://freedom-developer.gitbook.io/the-chess/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://freedom-developer.gitbook.io/the-chess/the-uis/enquiry.md).

# Enquiry

Step 1 :&#x20;

Create an empty scene with any name of your liking and open the scene.

Step 2 : Adding necessary scene game objects for this exercise.

Go to the Prefabs folder inside path UIs/Essential and drag ChessGameObjectBase prefab into the scene hierachy.

<figure><img src="/files/JsaNYN1mEDbOm7hcXZz4" alt=""><figcaption></figcaption></figure>

Then, create a canvas and drag the dropdown prefab located inside Base folder of path Prefabs/UIs/Dropdown into the canvas. Or create a legacy dropdown of your own on the scene, the dropdown prefab is actually  the same as legacy dropdown.&#x20;

<figure><img src="/files/FUJLPZL7C5partccN3G3" alt=""><figcaption></figcaption></figure>

Step 3 :&#x20;

Copy code below to ChessEnquiryManager.cs located in Scripts/Main/Communicators folder

```
    public delegate int TotalDropdownOptionCount();
    public static event TotalDropdownOptionCount EnquiryTotalDropdownOptionCount;
    
    public static int GetTotalDropdownOptionCount()
    {
        var hasValue = EnquiryTotalDropdownOptionCount?.Invoke();

        if (hasValue != null)
        {
            return (int)hasValue;
        }
        else
        {
            throw new System.NullReferenceException(GenerateErrorMessage(typeof(TotalDropdownOptionCount).Name));
        }
    }
```

Step 4 :&#x20;

Create a C# script in the path Scripts/Main/UIs/Dropdowns named DummyDropdown.cs and copy the code below into it. The `GetOptionsCount()` function is from the base class, getting the number of dropdown options currently the dropdown have.

<pre><code><strong>namespace TheChess
</strong><strong>{
</strong><strong>    public class DummyDropdown : ChessDropdownUI
</strong>    {
        protected override void Subscribes()
        {
            ChessEnquiryManager.EnquiryTotalDropdownOptionCount += GetOptionsCount;
        }
    
        protected override void Unsubscribes()
        {
            ChessEnquiryManager.EnquiryTotalDropdownOptionCount -= GetOptionsCount;
        }
    }
}
</code></pre>

Step 5 :&#x20;

The code below can be called in any GUI script to get the number of dropdown options.

```
        Debug.Log(ChessEnquiryManager.GetTotalDropdownOptionCount());
```
