# loopPointReached

> The VideoPlayer emits this event when the video reaches the end of its playback.

## Definition

* **Type:** Event
* **Namespace:** [UnityEngine.Video](/engine/6000.6/script-reference/unityengine/video.md)
* **Assembly:** UnityEngine.VideoModule

```csharp
public event VideoPlayer.EventHandler loopPointReached
```

### Remarks

If you set the [VideoPlayer.isLooping](/engine/6000.6/script-reference/unityengine/video/videoplayer/islooping.md) property to `true`, this event makes the video play again. Otherwise the [VideoPlayer](/engine/6000.6/script-reference/unityengine/video/videoplayer.md) stops. You can also set the **Loop** property in the Inspector window of the [VideoPlayer](/engine/6000.6/script-reference/unityengine/video/videoplayer.md) component.

Additional Resources: [VideoPlayer.isLooping](/engine/6000.6/script-reference/unityengine/video/videoplayer/islooping.md), [VideoPlayer.started](/engine/6000.6/script-reference/unityengine/video/videoplayer/started.md), [VideoPlayer.EventHandler](/engine/6000.6/script-reference/unityengine/video/videoplayer/eventhandler.md).

### Examples

```csharp
// This script plays a Particle System when the video finishes, and then loops the video. 
// Attach this script and a VideoPlayer component to a GameObject. Also attach a ParticleSystem in the Inspector. 

using UnityEngine;
using UnityEngine.Video;

public class LoopPointReachedExample : MonoBehaviour
{
    VideoPlayer videoPlayer;
    public ParticleSystem particles; 

    void Start()
    {
        videoPlayer = GetComponent<VideoPlayer>();
        particles.playOnAwake = false; 

        // When the video playback is done, restart the video. 
        videoPlayer.isLooping = true;

        // Each time the video reaches the end, call this function. 
        videoPlayer.loopPointReached += OnLoopPointReached;

        videoPlayer.Play();
    }

    void OnLoopPointReached(VideoPlayer vp)
    {
        // Play the particle effect when the video reaches the end.  
        Debug.Log("Loop finished, play particle effect.");
        particles.Play();
    }
}
```
