[NUI] Switch camera includes current camera's Unparent() #5391
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Synchronizing DALi and NUI cameras' parent.
DALi's SelectCamera() includes unparenting current camera component, and NUI's SelectCamera() simply calls the function.
However, since they manage different objects on each side, NUI's camera is still attached to its parent.
This can be a problem in a situation such as:
// dummy is a View
dummy.Add(defaultCamera);
sceneView.Add(dummy);
sceneView.SelectCamera(1u);
sceneView.SelectCamera(0u);
dummy.Add(defaultCamera);
In NUI side, default camera was never detached from dummy but DALi's SceneView now has both dummy and default camera as its children. (The last line is ignored on NUI side.)