<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [LightManager](./server.lightmanager.md) &gt; [getAllLights](./server.lightmanager.getalllights.md)

## LightManager.getAllLights() method

Retrieves all spawned Light instances for the world.

**Signature:**

```typescript
getAllLights(tickAllocated?: boolean): Light[];
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

tickAllocated


</td><td>

boolean


</td><td>

_(Optional)_ Whether to use the tick allocator to allocate the returned array of Light instances. The allocated array will be collected and released at the end of the current tick if true. Only use this if you know what you're doing.


</td></tr>
</tbody></table>
**Returns:**

[Light](./server.light.md)<!-- -->\[\]

An array of Light instances.

