You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
770 B
29 lines
770 B
using System.Collections.Generic; |
|
|
|
namespace UnityEngine.EventSystems |
|
{ |
|
internal static class RaycasterManager |
|
{ |
|
private static readonly List<BaseRaycaster> s_Raycasters = new List<BaseRaycaster>(); |
|
|
|
public static void AddRaycaster(BaseRaycaster baseRaycaster) |
|
{ |
|
if (s_Raycasters.Contains(baseRaycaster)) |
|
return; |
|
|
|
s_Raycasters.Add(baseRaycaster); |
|
} |
|
|
|
public static List<BaseRaycaster> GetRaycasters() |
|
{ |
|
return s_Raycasters; |
|
} |
|
|
|
public static void RemoveRaycasters(BaseRaycaster baseRaycaster) |
|
{ |
|
if (!s_Raycasters.Contains(baseRaycaster)) |
|
return; |
|
s_Raycasters.Remove(baseRaycaster); |
|
} |
|
} |
|
}
|
|
|