Level Blueprint "c++" equivalent

In order to code my level BP, could I instead make a a new class deriving from LevelScriptActor? I want to have all my level functionality in code instead of the level blueprint. If so, would I have to specify this new class in my GameMode so that it would be aware of the my new LevelScriptActor class. If not, how would I implement this?

Thanks in advanced!

Interesting idea, it can be done by opening the level blueprint and reparenting it to the custom LevelScriptActor class.

#Yes. It’s hidden though.
Click the Show All Classes Link and search for level

By definition, that is the equivalent class.

[ULevelScriptBlueprint][2]

87079-

I suggest you have a look at this link C++ Programming in UE4.

If you have an instance already created you can create a C++ class for it or you could just assign it a variable and reference it from another class file. I’m not sure this question belongs here though. You may want to post a new question.

hey volkmedia, I perhaps my pervious question might have been misinterpreted. When I`m working in my blueprint levelBP, I can simply right click and reference the actor selected in the level. I guess would there be a way to get a straight reference into the actual c++ levelBP (the reparented class) in a similar way?

There isn’t a right click create C++ class from selected object/actor that I know of. I believe you have to parent it. So you would first create a new C++ Actor class then within that class you can reference your mesh.

In YourMesh.h

 //Return YourMesh    
  FORCEINLINE class UStaticMeshComponent* GetMesh() const { return  YourMesh;}

In YourMesh.cpp

 // Create YourMesh Component
YourMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("YourMesh"));