Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Part 1 of the script to place holograms based on raycasts with AR Foundation
public class ARPlaceHologram : MonoBehaviour
{
// The prefab to instantiate on touch.
[SerializeField]
private GameObject _prefabToPlace;
// Cache ARRaycastManager GameObject from ARCoreSession
private ARRaycastManager _raycastManager;
// List for raycast hits is re-used by raycast manager
private static readonly List<ARRaycastHit> Hits = new List<ARRaycastHit>();
void Awake()
{
_raycastManager = GetComponent<ARRaycastManager>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment