/****************************************************************************
* Copyright 2019 Nreal Techonology Limited. All rights reserved.
*
* This file is part of NRSDK.
*
* https://www.nreal.ai/
*
*****************************************************************************/
namespace NRKernal
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// The canvas target collector.
public class CanvasTargetCollector : MonoBehaviour
{
/// The canvases.
private static readonly List canvases = new List();
/// Adds a target.
/// The object.
public static void AddTarget(ICanvasRaycastTarget obj)
{
if(obj != null)
canvases.Add(obj);
}
/// Removes the target described by obj.
/// The object.
public static void RemoveTarget(ICanvasRaycastTarget obj)
{
if (obj != null)
canvases.Remove(obj);
}
/// Gets the canvases.
/// The canvases.
public static List GetCanvases()
{
return canvases;
}
}
}