I have "Enabled World Composition" and my tiled levels stream in and out nicely. One of my assets is a railway track. In the construction script the asset reads coordinates from a file and creates a bspline with those coordinates. The construction script then places sleepers and rails to create accurately curved track. This screenshot show a 100m tile. The tracks (there are four of them) look straight because the radius of curvature is several kilometres - this is fine. Notice that the name of the level is 5042-2473. The next tile (upwards) is 5042-2474, then 5042-2475 etc. so the level name indicates the coordinates of the bottom left corner of the tile on a 100m grid.

The tricky part is that the coordinate information is held in a file with a similar name but with a .json extension. So the data file for this tile is 5042-2473.json. I use "Get Current Level Name" (see below) to get the name and this is fine when I test the level on it's own.

However, when I move to the persistent level to test the level streaming this node returns "Level_Base" which is the name of my persistent level and the rest of the blueprint attempts (and obviously fails!) to load data from the non-existent "Level_Base.json".
I realise I could hard-code the name of the data file but there are potentially thousands of tiles so I'd really like to avoid this.
So my questions are:
Help and/or suggestions gratefully received!
Cheers,
Derek Hunter.
The tricky part is that the coordinate information is held in a file with a similar name but with a .json extension. So the data file for this tile is 5042-2473.json. I use "Get Current Level Name" (see below) to get the name and this is fine when I test the level on it's own.
However, when I move to the persistent level to test the level streaming this node returns "Level_Base" which is the name of my persistent level and the rest of the blueprint attempts (and obviously fails!) to load data from the non-existent "Level_Base.json".
I realise I could hard-code the name of the data file but there are potentially thousands of tiles so I'd really like to avoid this.
So my questions are:
- Is there a way to get a streamed level name in a blueprint?
- Could I achieve the same result in a different way?
Help and/or suggestions gratefully received!
Cheers,
Derek Hunter.
Comment