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.


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


Last updated
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));
}
}namespace TheChess
{
public class DummyDropdown : ChessDropdownUI
{
protected override void Subscribes()
{
ChessEnquiryManager.EnquiryTotalDropdownOptionCount += GetOptionsCount;
}
protected override void Unsubscribes()
{
ChessEnquiryManager.EnquiryTotalDropdownOptionCount -= GetOptionsCount;
}
}
} Debug.Log(ChessEnquiryManager.GetTotalDropdownOptionCount());