UKismetSystemLibrary::GetAdIDCount
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the total number of ad unit IDs configured for the project that can be selected via AdIdIndex.
Caveats & Gotchas
- • iOS and Android only in practice — reflects the platform ad-ID configuration, which is typically empty on other platforms.
- • The Blueprint node is renamed to "Get Ad ID Count" via a DisplayName meta tag even though the underlying C++ function is GetAdIDCount.
- • Use this to validate AdIdIndex bounds before calling ShowAdBanner or LoadInterstitialAd rather than hardcoding an index.
Signature
static int32 GetAdIDCount() Return Type
int32 Example
Validate an ad index before showing a banner C++
if (AdIdIndex < UKismetSystemLibrary::GetAdIDCount())
{
UKismetSystemLibrary::ShowAdBanner(AdIdIndex, true);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?