All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Asset Store version is now available! It's been almost a year since start, right now I think I am quite confident about the package.
- New dedicated website http://exceed7.com/notch-solution which sync with the also new offline
Documentation~
hidden folder of this package. - The debug scene is now compatible with UPM's import samples button.
- Massive documentation structure change. They are now able to be used with DocFx while still quite readable from code editor. (But instead we could make a static site or even a PDF now.)
- XML triple slash code comments update across all files so DocFx could generate an online documentation correctly.
- Access modifiers revised, many wrong
public
are now properlyinternal
for example. It also make DocFx generates only what the user should care about. If you were using some of those wrongpublic
your code may break, however. - The debug scene is moved to
/Samples~
to support UPM sample importing. (To maintainers : remove~
when you want to edit, then add back when finished.) More scene which will actually be a sample of how to build the UI will be added in this proper format. Tutorial is also added to the website. LICENSE
changed toLICENSE.md
because otherwise the "license" link in UPM will not link to it.
- Fixed a problem that Device Simulator was simulating
Screen.currentResolution
instead ofScreen.width/height
and Notch Solution components were looking toScreen.width/height
and getting wrong modifications.
- Configuration system : you are given 2 configurations for each build platform. In each one it can remember its own overlay. This is used in a workflow where you constantly check between two extreme setups (e.g. iPhone - iPad) while iterating on the game UI.
- It now use asset file in
ProjectSettings
instead ofEditorPrefs
. Settings is now persisted per-project. Code related toEditorPrefs
has been refactored everywhere. - Device database migrated to definition file based in the same format as Unity Device Simulator package in 2019.3 is using. (Contributed by 06Games)
- Alt+M to switch Game View between 2 settings has been removed along with
EditorPrefs
. This funtionality will be added back to the new configuration system later.
- Added support for 2019.3 in general.
- Added support for Unity Device Simulator package. If we detected that, all the components that wants a safe area simply ignores Notch Simulator simulated values and go back to follow
Screen.safeArea
just like in runtime, but it is now modified in edit time from inside-out by Device Simulator package. The package is 2019.3 or above only. - Galaxy Note 10 Plus device overlay added. (Contributed by 06Games)
- Add an editor button for creating all required assets for adaptation components.
- Add an editor button for temporarily assign the controller asset so you could design the adaptation in Animation panel. (Usable with asset created from the prior button.)
- Documentation structure refactored. (Contributed by 06Games)
- "Adaptation" components added. This series of components could adapt anything including non-UI stuff with help from animation playables API. This is needed because with
SafePadding
we were relying on uGUI layout system to move the entire hierarchy tree, and it is not usable outside of uGUI. The adaptation component is more flexible, as long as something is animation keyable, it could be responsive to a presence of notch & other things.SafeAdaptation
: Adapt according to relative screen space taken by a selectable single side of safe area.AspectRatioAdaptation
: LikeSafeAdaptation
but use aspect ratio number of the screen. Doesn't sounds notch-related, but it is a part of "notch solution" because I have use this together to solve arrangement problems.
- New script icon for
SafePadding
since I lose the original vector project file, and I want the newly made component icons to look similar to it. (Affinity Designer icon project file is also added toIcons
folder in the repo now to prevent losing it again.) - Cutout information propagated to layout components, but currently unused. (Contributed by 06Games)
- Code refactor throughout.
- Sometimes the overlay mockup didn't update its overlay graphic. Added a new destroy-create routine to force refresh it. (Contributed by 06Games)
- Preference item added under "Notch Solution". You can adjust overlay color of prefab mode there.
- New shortcut to quick switch between 2 Game view aspect ratio. Set this up in the preference menu. This is ideal for mobile development where if you could ensure that narrowest and widest screen looks nice, everything in-between should also work.
- Overlay for Samsung Galaxy S10 and S10+ added. (Contributed by 06Games)
- Tree simulation device enum selector for 2019.2+ (Contributed by 06Games)
influence
added toSafePadding
, it is default to 1 that means the safe area taking full effect. It applies to all sides.- "Dual Orientation" choice now only show up in Inspector if in your Player Settings, Resolution and Presentation section, you have Orientation settings in a way that it is possible to get both portrait and landscape orientation.
- Shortcut for toggling notch simulation added with the new
UnityEditor.ShortcutManagement
shortcut API. Bound toAlt+N
by default. - Cutout database for all available devices. Although they are not used yet currently.
- Removed
[ExecuteInEditMode]
fromSafePadding
. - Simulation database for One Plus 6T and Huawei Mate 20 Pro was incorrect. It is now updated according to submitted debug data in this thread.
HideFlags
mistake fixed.
- Prefab mode (
PrefabStage
) suppport added. There is now an overlay while editing a prefab, so you could design "full screen canvas as a prefab" in isolation while preview the notch. Previously you must save the prefab first, the see the update in Game tab while Scene tab is still in prefab mode. Note thatPrefabStage
is in experimental namespace, it is bound to break in future version. - New simulation device : iPad Pro. From running screen query on the Xcode simulator, the iPad Pro do have a safe area of 40px for that black line at the bottom (both orientations), plus small curved corners.
- Added a changelog.
- Aspect ratio number in the Notch Simulator warning help box is rounded to nice number.
SafePadding
's delayed update is now usingWaitForEndOfFrame
instead of wait for the next frame.
This is not an actual version since I just keep a changelog starting from 1.2.0, but I will list notable changes here off the top of my head.
- Debug scene added. It is now possible to distribute a test APK to collect cutout data of various phone. 2019.2's
Screen.cutouts
is supported in the debug scene, but no actual use by theSafePadding
yet. - Overlay color matches Personal and Professional skin.
- Two new devices: Huawei Mate 20 Pro & OnePlus 6T. (Contributed by 06Games)
- Added a warning about wrong Game tab aspect not matching notch preview device.
- Added a
README.md
documentation.
OnEnable
ofSafePadding
changed to delayed update. (Contributed by Froghut)- Screen ratio function fixed. (Contributed by 06Games)
- Get the correct root canvas when you have multiple nested
Canvas
on the hierarchy. (Contributed by mmatvein)
The first version!!