# Unreal engine how to put play to a level sequencer from C++ "get an ALevelSequenceActor from the scene in c++"

**URL:** <https://forums.unrealengine.com/t/unreal-engine-how-to-put-play-to-a-level-sequencer-from-c-get-an-alevelsequenceactor-from-the-scene-in-c/502492>\
**Category:** C++\
**Tags:** unreal-engine, CPP, UE4-27, question\
**Created:** [February 27, 2022, 3:08am UTC](https://forums.unrealengine.com/t/unreal-engine-how-to-put-play-to-a-level-sequencer-from-c-get-an-alevelsequenceactor-from-the-scene-in-c/502492 "2022-02-27T03:08:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Ariel\_Gimenez](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ariel_gimenez/32/591990_2.png) [@Ariel\_Gimenez](https://forums.unrealengine.com/u/Ariel_Gimenez)\
**Post date:** [February 27, 2022, 3:08am UTC](https://forums.unrealengine.com/t/unreal-engine-how-to-put-play-to-a-level-sequencer-from-c-get-an-alevelsequenceactor-from-the-scene-in-c/502492/1 "2022-02-27T03:08:40Z")

</div>

Unreal Engine Version: 4.27.2-18319896+++UE4+Release-4.27

 ![Screenshot_6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/0/090011f910d8ccf36efee452a1785bf394814c87.jpeg)

Does anyone know how to include ALevelSequenceActor in a .CPP file, I did not enter the form, it shows me an error…  
The issue is that I want to handle the levelsequence from C++ but I can’t find a way to include the library.  
**I mean I include it like this.**  
 ![Screenshot_5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/e/b5e7d99a6b1a9560ec275e83bae05191b6b678c3.jpeg)  
code:

```auto
#include <LevelSequence/Public/LevelSequenceActor.h>

```

and if i want to do this  
**Error in ALevelSequenceActor::StaticClass().**

 ![Screenshot_12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/a/f6af9c0a84223c57041421d61f148cc9c3debd98.jpeg)  
Code:

```auto
|TArray< AActor*> level_Sequences;
||UGameplayStatics::GetAllActorsOfClass(GetWorld(), ALevelSequenceActor::StaticClass(), level_Sequences);

```

I also included in Build.Cs LevelSequenceActor, but it doesn’t work.

 ![Screenshot_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/8/2b87107ca478cdbb523a345078029f28573344ef.jpeg)

And this is a weird include error that appears in LevelSequenceActor.h

 ![Screenshot_7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/6/1560d069076f9735186e46178ce937704d2e63e1.jpeg)

I also cannot declare a pointer of type ALevelSequenceActor

 ![Screenshot_9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/a/afacbe174cbf0d15b87e400192d7bafea95e0546.jpeg)

---

_[View the full topic](https://forums.unrealengine.com/t/unreal-engine-how-to-put-play-to-a-level-sequencer-from-c-get-an-alevelsequenceactor-from-the-scene-in-c/502492)._
