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

"Randomize" button on a collection will only randomize between loaded assets #26

Open
Kalmalyzer opened this issue Apr 16, 2020 · 0 comments

Comments

@Kalmalyzer
Copy link

If you have a collection, that contains a couple of prefabs, and this collection has been placed into a level, then the "Randomize" button on the instantiated collection will sometimes not randomize between all its prefabs. Rather, it seems that it will only randomize between the prefabs that are currently loaded.

Repro steps:

  • Start UE4
  • Create a blank project
  • Install Prefabricator
  • Create 3 prefabs (for example, one with a cube, one with a cylinder, and one with a sphere mesh)
  • Create a collection that contains all 3 prefabs
  • Place prefab 1 into the level
  • Place prefab 2 into the level
  • Shut down UE4
  • Start UE4
  • Open project
  • Place the collection into the level
  • Click "Randomize" repeatedly on the collection
  • Observe how the "Randomize" action will only switch between prefabs 1 & 2
  • Place prefab 3 into the level
  • Click "Randomize" repeatedly on the collection
  • Observe how the "Randomize" action will now switch between prefabs 1, 2 & 3
  • Remove prefab 3 from the level
  • Click "Randomize" repeatedly on the collection
  • Observe how the "Randomize" action will still switch between prefabs 1, 2 & 3
  • Save & exit UE4
  • Start UE4
  • Open project
  • Click "Randomize" repeatedly on the collection
  • Observe how the "Randomize" action will again only switch between prefabs 1 & 2

I haven't looked deeply into the code, but I suspect that the randomization mechanism will skip prefabs that are not currently loaded. The appropriate behavior is to force loading of the asset that is chosen by the randomization. (Or: first force loading of all assets referenced by the collection, then randomize between the assets that are loaded.)

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

No branches or pull requests

1 participant