Creating a forest then wrapping it into a Blueprint

That’s because you aren’t storing an un-typed reference. The spawn process outputs the exact instance.
“get all” or various other derivatives, are usually soft references that have to be solved to be usable.
Usually, because it depends a lot on what you are getting and how.

Me either? In theory, you are correct that it should be the instance, ready to go with all it’s actors and variables accessible as if you were to access a level directly.
However that “dynamic” in the reference, may be the issue…

Hey again

The dynamic in the reference is just appearing after I tried your idea, adding a class to the Level Instance node (one of them was “Dynamic”).
I figured maybe this could be similar to Blueprint Child Actor, where you have to “get child actor” first, then you can cast to it?
But still couldn’t find the relevant node.

I’ll try to maybe get around this by
1- doing everything in the sublevel by event dispatches so I won’t have to call it
2- trying what people mentioned in other posts, that the “set location” works in standalone mode

will update

1 Like

Ok so half good half bad news:
I am able to recognize the trigger event from within the Sublevel, so I don’t have to call it from the main level.
(which will fit the “add all objects into actor” method to move them all)

But!
Since I’m using instanced Foilage, it gives me an error where you can’t add that into a null/dummy object:

So I have to move the level as a whole (or find a way to parent the foliage to the actor) without parenting the objects to a main object, not sure how yet.

I can’t get the ■■■■ thing to move either… :crazy_face:

I think you just have to unstream and re-stream it.

That might do it, but maybe it works in Standalone and then it’s fine in the long-run, I suspect unstream+restream will take longer than a transform change

I’ve tried it in stand alone and packaged. It doesn’t even load the level :man_facepalming:

ouff so sounds a bit risky no? eventually I sell this product - might be bound to work with Blueprints only until they solve it.

1 Like

I never seen how moving levels performs. If it’s anything like moving actors with things attached, you’re better off streaming it back out and in again… :smiley:

but didn’t you say it didn’t even load the level when packaged?

there are some benefits to transform movement vs. destroy/spawn
for example if some animation is ongoing - moving the location will not change the flow, while re-streaming might result in some glitches / until it updates properly.

Moving it could just as easily cause a glitch.

Just trying an idea here…

1 Like

Yeah. Does spawn in standalone, but not in packaged. And won’t move in either.

Welcome to the future… :christmas_tree:

1 Like

I think this needs to be done or at least exposed from c++.

Afterall, its similar to world origin rebasing…

1 Like

Is there any way that someone without c++ knowledge like me can do this?

or, at least to find a way to move the foliage object, cause that’s the only problematic one

You can loop all instances and move them, but without going from C++ you are just going to hit a loop limit on just anything with over 100 instances I’m afraid.

You could convert from foliage instances to mesh instances. It may work better that way too depending on what kind of load the initial scene has.

Converting to mesh instances sounds like an option, then I can move them at least.
How does one do that? is that automated?

Not sure of the best way.

While there should probably be an automated way of some sort…

You can actually do a simple bluetility script, loop through the emements of foliage and add a mesh into an hirerchical static mesh component with the same transform.
I’d set it up in groups of 100 at a time, prevent loop limit cut-offs.

Adding an actor blueprint wthe the component is probably yout best bet.

That’s how I did my foliage until now, with instances and HSIM, but I had to do it manually via grids and splines.
Is there a way to “call” the foliage locations I set with the foliage tool? so the instancing is Blueprinted but the locations are already pre-set

Yea, you can copy the transforms over in the same loop.

not sure I follow. how do I copy all the foliage locations from the foliage tool, into a manual instances system?

When you loop over the instance, you can read each instance’s transform in order to replace it or add it with the transform and the mesh to a different HISMC or anything else that holds the array of instances… Or even not use instances.