Default AR App
Documentation for the Default AR App project found at https://github.com/ingratexr/unity-ar-boilerplate
ARPlacementMgr Class Reference

Class that looks for surfaces to place objects in AR by raycasting out from camera. More...

Inheritance diagram for ARPlacementMgr:

Public Member Functions

delegate void ObjectPlacedEventHandler (GameObject obj)
 Delegate for event for when this script places an object. More...
 
delegate void ObjectMovingEventHandler (GameObject obj)
 Delegate for event for when this script starts moving an object. More...
 
delegate void LookingForPlanesEventHandler ()
 Delegate for event for when this script starts looking for surfaces. More...
 
delegate void FoundPlaneEventHandler ()
 Delegate for event for when this script finds a surface. More...
 
void InitPlacementObjAndIndicator (GameObject _objToPlace, GameObject _placementIndicator, float _screenPointHeight=0.5f)
 Sets the object to place and the object to use as a placement indicator. More...
 
void PlaceObject ()
 Place the placementObjInstance at the pose's location (assumes pose's location is valid). More...
 
void MoveObject ()
 Place the object somewhere else. More...
 
void OnLookingForPlanes ()
 Fire LookingForPlanes event. More...
 
void OnObjectMoving ()
 Fire ObjectMoving event. More...
 
void OnFoundPlane ()
 Fire FoundPlane event. More...
 

Public Attributes

LookingForPlanesEventHandler LookingForPlanes
 Event fired when this script starts looking for surfaces. More...
 
FoundPlaneEventHandler FoundPlane
 Event fired when this script finds a surface. More...
 

Events

ObjectPlacedEventHandler ObjectPlaced
 Event called when this script places its object. More...
 
ObjectMovingEventHandler ObjectMoving
 Event called when this script starts moving its object. More...
 

Detailed Description

Class that looks for surfaces to place objects in AR by raycasting out from camera.

Where surfaces are found, prompts user with indicator that shows where the object will be placed. Places object. Should be placed on the same GameObject as ARPlacementUI component.

Member Function Documentation

◆ FoundPlaneEventHandler()

delegate void ARPlacementMgr.FoundPlaneEventHandler ( )

Delegate for event for when this script finds a surface.

◆ InitPlacementObjAndIndicator()

void ARPlacementMgr.InitPlacementObjAndIndicator ( GameObject  _objToPlace,
GameObject  _placementIndicator,
float  _screenPointHeight = 0.5f 
)

Sets the object to place and the object to use as a placement indicator.

Gets called when this script's object is enabled.

Parameters
_objToPlaceObject to place.
_placementIndicatorObject that shows the user where the object will go when they place it.

◆ LookingForPlanesEventHandler()

delegate void ARPlacementMgr.LookingForPlanesEventHandler ( )

Delegate for event for when this script starts looking for surfaces.

◆ MoveObject()

void ARPlacementMgr.MoveObject ( )

Place the object somewhere else.

◆ ObjectMovingEventHandler()

delegate void ARPlacementMgr.ObjectMovingEventHandler ( GameObject  obj)

Delegate for event for when this script starts moving an object.

Parameters
objObject this script is moving.

◆ ObjectPlacedEventHandler()

delegate void ARPlacementMgr.ObjectPlacedEventHandler ( GameObject  obj)

Delegate for event for when this script places an object.

Parameters
objObject this script placed.

◆ OnFoundPlane()

void ARPlacementMgr.OnFoundPlane ( )

Fire FoundPlane event.

◆ OnLookingForPlanes()

void ARPlacementMgr.OnLookingForPlanes ( )

Fire LookingForPlanes event.

◆ OnObjectMoving()

void ARPlacementMgr.OnObjectMoving ( )

Fire ObjectMoving event.

◆ PlaceObject()

void ARPlacementMgr.PlaceObject ( )

Place the placementObjInstance at the pose's location (assumes pose's location is valid).

If placementObjInstance doesn't exist, instantiates it. If it does exist, sets it to active. Turn off the placement indicator.

Member Data Documentation

◆ FoundPlane

FoundPlaneEventHandler ARPlacementMgr.FoundPlane

Event fired when this script finds a surface.

◆ LookingForPlanes

LookingForPlanesEventHandler ARPlacementMgr.LookingForPlanes

Event fired when this script starts looking for surfaces.

Event Documentation

◆ ObjectMoving

ObjectMovingEventHandler ARPlacementMgr.ObjectMoving

Event called when this script starts moving its object.

◆ ObjectPlaced

ObjectPlacedEventHandler ARPlacementMgr.ObjectPlaced

Event called when this script places its object.


The documentation for this class was generated from the following file: