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

Allow spawning multiple prefabs #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

francofusco
Copy link

@francofusco francofusco commented Apr 29, 2021

This PR deals with uzh-rpg/flightmare#77. More specifically it slightly changes the CameraController.cs script so that any prefab in the Templates folder can be spawned. All trailing white spaces in the modified sources were also removed.

A demo in flightmare (showing that these changes do work) is being proposed in the sibling PR uzh-rpg/flightmare#125.

@yun-long and @slimeth there are still 2 improvements that I would like to introduce, but I prefer having your feedback first:

  1. Currently, if you try to spawn a prefab not appearing in Templates, you will get a rpg_gate instead. I would prefer to create a new prefab, e.g., a cube with "404 not found" written on it, and spawn that instead. I think that showing such kind of object makes it much clearer that an error occurred.
  2. Currently, you can only add objects, but I have already worked on a variant of the scripts that also allows to remove them. Do you think such a feature is desirable? If so, I'll polish my solution and add it to this PR.

Cheers!

This commit allows to insert any prefab inside a scene, not only gates.
@francofusco
Copy link
Author

Ping!

@slimeth
Copy link
Contributor

slimeth commented Jun 6, 2021

LGTM
@francofusco regarding your improvement suggestions. I think both of them make sense and especially the features to remove objects is desirable.

Thank you for your great work!

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

Successfully merging this pull request may close these issues.

2 participants