I was trying to add a ULevel as a UProperty, which compiles just fine.
However, I can’t actually set the value in the blueprint editor. No search results show up, and I can’t assign the value when I press use selected asset from content browser.
I might be able to get a reference to the level through C++ somehow. I can get a reference string to the level and it looks something like this: World’/Game/Environments/Test/TestLevel.TestLevel’
Before I go down this road, is there a good reason we shouldn’t do this?
A bit of background on what I’m trying to do:
Random level generator. I want to make chunks of levels that get put together in random arrangements. So far, I had success by using actors and placing components in the blueprint editor, but it’s just not the same as the level editor. I can’t place volumes easily, and in general, the editor’s interface is much better than the blueprint editor’s component editor. Just try making a mini level and you’ll see what I’m talking about. I was hoping to access the ULevel’s Actors array and use that as a template to spawn real actors in a randomly generated level. At the moment, I’m using the AActor’s components array as a template to spawn static mesh components, lights, and other things in the world.
I also failed to extent ULevel itself, so I was hoping to at least make an AActor that contains a reference to a ULevel and I could configure those easily from within the editor.