> 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

Here is how you can enquiry UI information. The below example is trying to get a dropdown options count info from a dropdown UI.

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="https://2079102914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA7OKfIba5xvQF1lhv60z%2Fuploads%2Fkd3wvGbSdk1Zod4euBvf%2FUnity_vlZN32M8ui.png?alt=media&amp;token=5666c07e-3405-4ae9-81fc-03ab2be728d1" 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="https://2079102914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA7OKfIba5xvQF1lhv60z%2Fuploads%2F1Ckz5HKkwXtV5jeDmDHB%2FUnity_KxY3uA66Za.png?alt=media&amp;token=f3279ce0-bd5b-4c0e-b37f-ba43027035f5" 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());
```
