ARManager
public class ARManager
Stores and manages common functional for the ARView
-
The Root Entity with the entities that back the real world positions of the Annotations as children
Declaration
Swift
public var sceneRoot: Entity? -
Initializer
Declaration
Swift
public init() -
Set the configuration for the ARView’s session with run options
Declaration
Swift
public func configureSession(with configuration: ARConfiguration = ARWorldTrackingConfiguration(), options: ARSession.RunOptions = []) throws -
Set the session for automatic configuration
Declaration
Swift
public func setAutomaticConfiguration() -
Adds the given entity which conforms to
HasCollisionas a child of the sceneRoot HasCollision is internally required for entities to have a touch gesture applied for interactionDeclaration
Swift
public func addChild(for entity: HasCollision, preservingWorldTransform: Bool = false) -
Adds a Entity which conforms to HasAnchoring to the arView.scene
Declaration
Swift
public func addAnchor(anchor: HasAnchoring) -
Removes the specified HasAnchoring from the scene
Declaration
Swift
public func removeAnchor(anchor: HasAnchoring) -
Finds Entity in the scene from the given name, returns nil if the entity does not exist in the scene
Declaration
Swift
public func findEntity(named: String) -> Entity? -
Adds an ARReferenceImage to the configuration for the session to discover Optionally can set the configuration to ARImageTrackingConfiguration
Declaration
Swift
public func addReferenceImage(for image: UIImage, _ name: String? = nil, with physicalWidth: CGFloat, configuration: ARConfiguration = ARWorldTrackingConfiguration(), resetImages: Bool = false)