Skip to content

Allow spawning multiple prefabs#8

Open
francofusco wants to merge 1 commit into
uzh-rpg:mainfrom
francofusco:add_new_objects
Open

Allow spawning multiple prefabs#8
francofusco wants to merge 1 commit into
uzh-rpg:mainfrom
francofusco:add_new_objects

Conversation

@francofusco
Copy link
Copy Markdown

@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
Copy Markdown
Author

Ping!

@slimeth
Copy link
Copy Markdown
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