1. Code:
      List<BaseEntity> nearby = new List<BaseEntity>();
      Vis.Entities(player.transform.position, 3f, nearby, LayerMask.GetMask("Construction"), QueryTriggerInteraction.Ignore);  foreach (BaseEntity entity in nearby)
      {
        PrintToChat(entity.ShortPrefabName);
        PrintToChat(entity.transform.position.ToString());
        if (entity as Door == null) continue;
        if (entity.ShortPrefabName != "door.hinged.toptier") continue;
      }
    
    If there's a top tier door in that position-radius for some reason Vis.Entities finds it two times.

    This doesn't happend with a wood door.
    No idea why.
     
    Last edited by a moderator: Nov 18, 2016
  2. You can filter duplicates by "Distinct":

    Code:
      List<BaseEntity> nearby = new List<BaseEntity>();
      Vis.Entities(player.transform.position, 3f, nearby, LayerMask.GetMask("Construction"), QueryTriggerInteraction.Ignore);  foreach (BaseEntity entity in nearby.Distinct().ToList())
      {
        PrintToChat(entity.ShortPrefabName);
        PrintToChat(entity.transform.position.ToString());
        if (entity as Door == null) continue;
        if (entity.ShortPrefabName != "door.hinged.toptier") continue;
      }
     
  3. Solved. Thank you Fuji.

    Just for curiosity, do you know why is this happening?
     
  4. I had this issue recently, did exactly what Fujikura did to solve it, lol.

    I'm curious as to what causes it as well, since I believe it's only started happening recently
     
  5. Had the same problem before on a direct call of "Physics.OverlapSphere" while checking cupboards in range. Does also return on some cases some of them twice.