Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support actors changing their level in runtime #34

Open
muit opened this issue May 24, 2019 · 4 comments
Open

Support actors changing their level in runtime #34

muit opened this issue May 24, 2019 · 4 comments
Assignees
Labels
Feature Can I have this for Christmas?

Comments

@muit
Copy link
Member

muit commented May 24, 2019

Describe the feature requested
Support changing the level of an actor in runtime.

How does it help the user (you)?
Some games need this for AI, Items or similar systems.

Is it related to a problem?
Sometimes its considered a bug since saving an actor that changed level loads in the original level.

[Optional] Propose an approach to the feature (the less we think the better!)
Do a rework on how level data is cached.

[Optional] Additional context
Proposed by @AndyDee and @dkoding

@muit muit added the Feature Can I have this for Christmas? label May 24, 2019
@muit muit self-assigned this May 24, 2019
@Acrossfy
Copy link

Here you can find an example project: link.

@Acrossfy
Copy link

More details about example project and desired behavior:

  • Main map is World_Test. There're four sub-level parts of the world with low streaming distance - 6k.
  • PlayerStart is placed on TL_X0_Y0. Also there're three physical BP_DynamicObject on it, closer to the world's center.
  • When game starts, player is placed closer to the world's center and all sub-levels are loaded by distance.
  • All three BP_DynamicObject start falling and fall on different sub-levels.
  • Each dynamic object changes its outer to the level it falls on (see BP and C++ source).
  • You can fly around and see how levels loading and unloading and what's going on with dynamic objects on them.

Expectations:

  • All sub-levels should remember all added and removed actors.

Reality:

  • Sub-levels with added actors do not save them.
  • Sub-levels with removed actors do not save even their last state before they were moved to another level (using Rename() method). Actors appears on their default (unsaved) location with default state.

@kbbits
Copy link

kbbits commented Jun 10, 2019

I've created another sample project that you can reproduce this issue as well as issues: #25 , #30 & #34.
Issue note: These sub-level actors do not change their level during run-time. They are initially spawned with an actor in the sub-level as their Owner.

https://github.com/kbbits/SaveExtentionTest_2
Note: this project has C++ code -- just a few structs for DataTable use.

To repro #34 (actors in sublevel):

  • open project in editor.
  • Set all three SaveExtention synch preferences to Only Synch.
  • Run PIE in new editor window.
  • Hit "b" to spawn ball in persistent level (yellow ball)
  • Walk up to sublevel 1 platform. (HUD will indicate Sublevel_1)
  • Hit "b" to spawn in Sublevel_1, green ball (this sublevel is not streamed, it's always loaded)
  • Walk up to top sublevel 2 platform (HUD will indicate Sublevel_2)
  • Hit "b" to spawn a ball in Sublevel_2 (red ball).
  • Walk down to ground.
  • Hit "k" to save game.
  • Exit game (left-shift+x)
    After the steps above proceed to:
  • Start game again in new PIE.
  • Hit "l" to load game.
  • Note persistent and sublevel_1 actors are loaded. (yellow and green balls)
  • Note that sublevel_2 is not streamed in nor visible. (correct)
  • Walk up stairs triggering the stream-load of sublevel_2.
  • Note that the red ball (spawned into sublevel_2) is not present - this is a problem.
  • Hit "l" to load game.
  • Note sublevel_2 was already loaded(streamed) above, and now the game load did correctly re-load the sublevel_2 actor (the red ball).
  • Step onto the unload trigger to unload Sublevel_2.
  • Step onto sublevel_1 platform to reload Sublevel_2. The red ball that was loaded (above) is no longer present.

@kbbits
Copy link

kbbits commented Jun 10, 2019

I see that this issue is marked as a Feature. I humbly request that you either:
A) Change this issue to a bug.
or
B) Change your plugin description in the Marketplace and documentation to clarify "Level Streaming and World Composition" to "Level Streaming and World Composition - does not support dynamically created actors in sub-levels."

Without support for run-time spawned sub-level actors, all dynamically created actors would have to be loaded (in persistent or their own always-loaded sub-level) when the game is loaded. Basically cutting out a big benefit of world composition.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Can I have this for Christmas?
Projects
None yet
Development

No branches or pull requests

3 participants