AdGui
A surface-based GUI that displays immersive ads on a face of a Part in the 3D world.
| Memory category | Internal |
|---|
Member index 12
Description
AdGui is a SurfaceGuiBase that renders immersive display ads onto a face of the Part it's adorned to. When no ad is available, it shows the creator-supplied AdGui.FallbackImage, or a default Roblox fallback image when that property is empty.
To render ads, the AdGui must be adorned to a block Part that's a descendant of Workspace, must be the only surface GUI on that face, and must be at least the minimum eligible size. When these conditions aren't met, the object displays a placeholder image in Studio's edit view and renders nothing in a running experience.
History 21
- 734 Change Tags of OnAdEvent from [] to [Deprecated]
- 725 Add FallbackImageContent
- 645 Change ValueType of FallbackImage from Content to ContentId
- 639 Add GetSingleReportAdInfo
- 636 Add forwardStateToLuaUI
- 627 Add adGuiStateChanged
- 627 Add HandleLuaUIEvent
- 599 Add OnAdEvent
- 599 Add
- 599 Add
- 599 Add EnableVideoAds
- 574 Add FallbackImage
- 569 Change Default of Status from Active to Inactive
- 568 Add Status
- 553 Change Default of AdShape from to HorizontalRectangle
- 551 Change Tags of AdGui from [NotBrowsable] to []
- 549 Change MemoryCategory of AdGui from Instances to Internal
- 545 Change Tags of AdGui from [NotCreatable, NotBrowsable] to [NotBrowsable]
- 541 Change Tags of AdGui from [NotCreatable] to [NotCreatable, NotBrowsable]
- 540 Add AdShape
- 540 Add AdGui
Members 12
AdShape
| Type | Default | |
|---|---|---|
| AdShape | HorizontalRectangle | |
Determines the shape of the ad rendered by the AdGui, including the creative's aspect ratio on the part surface. Defaults to HorizontalRectangle, which is the only served shape aside from the sentinel Undefined.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
History 2
- 553 Change Default of AdShape from to HorizontalRectangle
- 540 Add AdShape
EnableVideoAds
| Type | Default | |
|---|---|---|
| bool | true | |
The property enables the AdGui to serve video ads.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
History 1
- 599 Add EnableVideoAds
FallbackImage
| Type | Default | |
|---|---|---|
| ContentId | ||
A creator-supplied image that the AdGui displays when it has no served ad to render. Defaults to an empty content string; while empty, the AdGui renders a default Roblox fallback image instead.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
History 2
- 645 Change ValueType of FallbackImage from Content to ContentId
- 574 Add FallbackImage
FallbackImageContent
| Type | Default | |
|---|---|---|
| Content | ||
A Content-typed property that holds the fallback image the
AdGui displays when no served ad is available. It is the
content-typed backing for AdGui.FallbackImage (a legacy
TextureId string); writing to either property updates the same
underlying storage. Unlike FallbackImage, this property accepts
asset URIs and references
to EditableImage objects. When empty, the AdGui renders a
default Roblox fallback image instead.
| Thread safety | ReadSafe |
|---|---|
| Category | Appearance |
| Loaded/Saved | true |
History 1
GetSingleReportAdInfo
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Map | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
HandleLuaUIEvent
| Parameters (1) | ||
|---|---|---|
| eventType | AdUIEventType | |
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 627 Add HandleLuaUIEvent
OnAdEvent
| Parameters (1) | ||
|---|---|---|
| eventInfo | Dictionary | |
| Returns (1) | ||
| bool | ||
| Thread safety | Unsafe |
|---|
Status
| Type | Default | |
|---|---|---|
| AdUnitStatus | Inactive | |
A read-only property that reports whether the AdGui is actively displaying a served ad. It's Active when the AdGui is rendering ad content, and Inactive otherwise.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | false |
adGuiStateChanged
| Parameters (1) | |
|---|---|
| adUIState | Variant |
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 627 Add adGuiStateChanged
forwardStateToLuaUI
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |