Getting a pointer to an ALevelSequenceActor in C++

I’m trying to get a pointer to an ALevelSequenceActor from C++ so I can serialize level sequences and their state during the game.

However, trying to add references to an ALevelSequenceActor doesn’t work since it doesn’t know what that is, and when I add

#include "Runtime/LevelSequence/Public/LevelSequenceActor.h"

I get

c:\users\paul\perforce\prototypeoc\ue4\engine\source\runtime\levelsequence\public\LevelSequenceObject.h(5): fatal error C1083: Cannot open include file: 'LevelSequenceObject.generated.h': No such file or directory

Clearly I’m missing something obvious …

Have you included “LevelSequence” as a dependency in your build.cs?

1 Like

That was it! I’ve never had such a fast answer on AnswerHub before.

117171-6-youre-awesome-puppy-dating-advice-help-me-find-love.jpg

Thank you for being awesome – I’m adding you to the Aven Colony credits :wink:

I’ve lost hours on this, because it still wasn’t working after being added to the .Build.cs … I cleaned everything from VS and even hit Compile from the Editor…that didn’t work. Then I went to File → Refresh Visual Studio Project - Now it FINALLY works.

1 Like