One Logo Pool Ball
RealityKit · IOS API REFERENCE

ARView.DebugOptions

struct · iOS 13.0+ · SDK 27.1

struct DebugOptions

Options for drawing overlay content in a scene that can aid in debugging.

Members (10)

get · iOS 13.0+

showPhysics

TypeScript
get showPhysics(): Promise<ARView_DebugOptions>
Swift declaration
static let showPhysics: ARView.DebugOptions

Draw visualizations for collision objects and rigid bodies.

get · iOS 13.0+

showStatistics

TypeScript
get showStatistics(): Promise<ARView_DebugOptions>
Swift declaration
static let showStatistics: ARView.DebugOptions

Collect performance statistics and display them in the view. Add this debug option to a view’s ``ARView/debugOptions-swift.property`` option set to display a variety of resource utilization metrics, overlaid on the view. The statistics update in real time so you can examine how your app performs and what resources it consumes under different usage conditions. ![A screenshot of a RealityKit app running on an iPad, showing statistics in the lower third of the display overlaid with partial transparency onto a scene with a virtual cube placed on a real wooden surface.](ARView-DebugOptions-swift-struct-showStatistics-1) For more information about how to use the data shown above and described below, see <doc:improving-the-performance-of-a-realitykit-app>. ### Measure time Items listed under the Frame CPU Time heading show how your app makes use of CPU time. The first item indicates frame rate, which directly impacts the quality of the user’s experience. The remaining items indicate average time in milliseconds per frame that the CPU spends performing certain tasks, as described below. - term FPS: The number of rendered frames per second. Typically capped at 60 fps, the system might reduce the frame rate under certain conditions. To achieve 60 fps, complete all computations in under 16.6 ms. - term Main Thread: Time spent performing Entity Component System (ECS), physics, animation, networking, and other computations like app updates. The CPU also works on this thread to prepare data for the render thread. - term Render Thread: Time spent in the render thread. The CPU creates command buffers and encoders to send to the GPU for processing. - term ECS: Time spent updating all components in your scene, getting them ready for physics, network, animation, and other updates. - term Physics: Time spent resolving collisions and physics simulations per frame. Additional physics work takes places during the ECS time as well as part of component updates. - term Network: Time spent sending and receiving data. The creation and processing of network data is part of the ECS time. - term Animation: Time spent managing animations. Some animation tasks occur during component updates, so they contribute to the ECS time instead. ### Measure geometry Items under the Scene Mesh Stats heading help you optimize your content. These statistics help you to estimate the complexity of your scene. - term Meshes: The number of meshes in the view. Reduce this number to lower both ECS and Render Thread times. - term Draw Calls: The number of draw calls required to render the scene. Reduce this number to lower the Render Thread time. - term Triangles Submitted: The number of triangles submitted to the GPU on each frame. - term Vertices Submitted: The number of vertices submitted to the GPU on each frame. ### Measure memory The items under the App Memory Usage heading help you understand how much memory your app uses. - term Dirty Memory Footprint: The amount of memory your app uses per frame. - term Peak Dirty Memory Footprint: The worst case amount of memory your app uses per frame.

get · iOS 13.0+

showWorldOrigin

TypeScript
get showWorldOrigin(): Promise<ARView_DebugOptions>
Swift declaration
static let showWorldOrigin: ARView.DebugOptions

Display a coordinate axis indicating the position and orientation of the AR world coordinate system. @Comment { TODO: showWorldOrigin, showAnchorOrigin, showAnchorGeometry should be enabled on macOS as well. }

get · iOS 13.0+

showAnchorOrigins

TypeScript
get showAnchorOrigins(): Promise<ARView_DebugOptions>
Swift declaration
static let showAnchorOrigins: ARView.DebugOptions

Display anchor origins.

get · iOS 13.0+

showFeaturePoints

TypeScript
get showFeaturePoints(): Promise<ARView_DebugOptions>
Swift declaration
static let showFeaturePoints: ARView.DebugOptions

Display a point cloud showing intermediate results of the scene analysis used to track device position.

get · iOS 13.0+

showAnchorGeometry

TypeScript
get showAnchorGeometry(): Promise<ARView_DebugOptions>
Swift declaration
static let showAnchorGeometry: ARView.DebugOptions

Display anchor geometry.

get · iOS 13.4+

showSceneUnderstanding

TypeScript
get showSceneUnderstanding(): Promise<ARView_DebugOptions>
Swift declaration
static let showSceneUnderstanding: ARView.DebugOptions

Display the depth-colored wireframe for scene-understanding meshes.

get · iOS 13.0+

none

TypeScript
get none(): Promise<ARView_DebugOptions>
Swift declaration
static let none: ARView.DebugOptions

Disable all debugging overlays.

init · iOS 13.0+

init

TypeScript
init(rawValue: number): Promise<ARView_DebugOptions>
Swift declaration
init(rawValue: Int)

Create a debug options enumeration from a raw value.

get · iOS 13.0+

rawValue

TypeScript
getRawValue($self: ARView_DebugOptions): Promise<number>
Swift declaration
let rawValue: Int

Options for drawing overlay content in a scene that aids in debugging the scene.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityKit types →