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

[NUI] Switch camera includes current camera's Unparent() #5391

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

jmmhappy
Copy link
Contributor

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.)

Copy link
Contributor

@bshsqa bshsqa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and good solution.

Copy link
Contributor

@hinohie hinohie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there will have some another sad problem about GetParent() API. But Anywayt, This PR it self looks good to me.

@hinohie hinohie merged commit 07a14ac into Samsung:DevelNUI Jul 12, 2023
3 checks passed
@jmmhappy jmmhappy deleted the select_camera branch August 3, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants