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

Partial support of notches + The debug scene displays the simulated information + Some other changes #19

Merged
merged 8 commits into from
Jun 17, 2019

Conversation

06Games
Copy link
Contributor

@06Games 06Games commented Jun 4, 2019

Adds a partial support of the notches (#2): the information on these is now available, it remains only to use them for the layout (easier said than done ...)
The debug scene displays the simulated device information so that you can easily see where the items are and thus verify your configuration.
The rect returned by the debug scene is now forced to match the rect in portrait or landscape mode to avoid confusion when copying (does not work for now with the option of reversing the orientation of the editor).
Sometimes the model was not displayed or was unusually small when I changed the size of the game view.

@06Games
Copy link
Contributor Author

06Games commented Jun 13, 2019

I can understand that you don't have the time to review these changes, if that is the case, I would not hold you against it.
But if you have problems with the changes to the code, I am at your disposal.

@06Games
Copy link
Contributor Author

06Games commented Jun 13, 2019

Here are some screenshots of the debug scene in the editor.
As you can see, the notch and safeArea are actually simulated, even after a reversal of the orientation

Unity_cansxkGTOP
Unity_N1XXfYXNSM

@5argon 5argon merged commit d5f7dd1 into 5argon:master Jun 17, 2019
@5argon
Copy link
Owner

5argon commented Jun 17, 2019

Thank you! I was occupied weeks ago : (

I am adding something related to non-UI notch adaptation next. In my game there is a camera facing world stuff that need to be adjusted based on notch size since the camera could also raycast to those like UI objects, and it became difficult to touch with notch.

But in non-UI we have no layout system that tells everything to move, the solution will probably be very generic like telling Animator or PlayableDirector to evaluate a certain time according to the relative width of notch, the result ended up usable or not is up to user to calibrate.

(For example a perspective camera facing top-down to a billiard table. With notch I would probably want to move the camera a bit higher to show more empty space around the table. Maybe this could be depending on Cinemachine, but if possible I don't want to have package dependency yet.)

@06Games
Copy link
Contributor Author

06Games commented Jun 17, 2019

No problem, I just thought you didn't see my pull request...
I'm curious to see what it will give!

@06Games 06Games deleted the patch-4 branch July 28, 2019 17:08
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.

3 participants