Beispiel #1
0
    public static bool AnyInRange(GameObject prefab, Vector3 center, int radius)
    {
#if DEBUG && VERBOSE
        Log.LogDebug("WorldSpawnSessionManager.AnyInRange");
#endif
        try
        {
            var query      = new ZdoPrefabQuery(center, radius);
            var prefabHash = prefab.name.GetStableHashCode();

            return(query.HasAny(prefabHash));
        }
        catch (Exception e)
        {
            Log.LogError($"Error while attempting to find any entity {prefab} nearby", e);
            return(false);
        }
    }