Migrating unity applications from easyar sense unity plugin 4.2 and earlier versions
Starting from version 4.3, the Unity plugin is distributed and managed through the Unity Package Manager, with significant structural changes to the plugin package. Therefore, additional steps are required when upgrading from version 4.2 or lower to version 4.3 or higher.
Migration steps
When upgrading from version 4.2 or lower, you need to:
- Delete all files of the old plugin, which may exist in the
Assets/EasyAR,Assets/Plugins,Assets/Samples, andAssets/StreamingAssetsfolders. - Then import the new version through Unity's Package Manager window.
- Update scenes and code according to the migration guides for each version below.
Migrating to version 4000 and later
Migrating to version 4000 and later requires the following changes.
Refer to Creating and configuring an AR session to recreate the scene structure.
Related changes:
- Prefabs have been removed.
VIOCameraDeviceUnionhas been removed.
Using AR Foundation requires referring to Enabling AR Foundation in EasyAR projects to use AR Foundation.
Related changes:
- AR Foundation support has been re-implemented.
You cannot use EasyAR on devices such as XREAL X and XREAL Light. It is recommended to switch to XREAL Air2 Ultra.
Related changes:
- Nreal/XREAL X and Nreal/XREAL Light are no longer supported.
- XREAL support is now built into EasyAR Sense, supporting XREAL Air2 Ultra.
Refer to Migrating to 4000 for subsequent migration work.
Version 4000 has more changes compared to 4.x.
Migrating to version 4.6
Warning
Version 4.6 is no longer maintained. It is recommended to directly upgrade to 4000 or a later version. The comprehensive Unity development documentation on the EasyAR website is prepared for versions 4000 and above.
Migrating to version 4.6 requires the following changes.
It is recommended to refer to the version 4.6 samples to understand the new scene structure and recreate relevant components.
Related changes:
- Prefabs have been removed.
VIOCameraDeviceUnionhas been removed.- AR Foundation support has been split into a separate package.
If you do not need to use AR Foundation, you can delete the AR Foundation node under the AR Session in the scene and remove the use of ARFoundationFrameSource in your code.
Related changes:
- AR Foundation support has been split into a separate package.
If you do not need to use Nreal, you can delete the Nreal node under the AR Session in the scene and remove the use of NrealFrameSource in your code. When using Nreal, creating a virtual package is no longer required.
Related changes:
- Nreal support has been split into a separate package.
It is recommended to refer to the interface documentation in the scripts and the version 4.6 samples to understand interface changes and usage, and make appropriate adjustments.
Related changes:
- Some other script interfaces have also changed.
- Some public methods are marked as internal in XML comments. These interfaces should be avoided as they have been removed in version 4000.
Migrating to version 4.4
Warning
Version 4.4 is no longer maintained. It is recommended to directly upgrade to 4000 or a later version. The comprehensive Unity development documentation on the EasyAR website is prepared for versions 4000 and above.
Migrating to version 4.4 requires attention to the following changes.
References to prefabs within the plugin package should be removed as much as possible. If you continue to use these prefabs, you will see warning logs containing brief instructions on how to replace them in the new plugin. It is recommended to refer to the version 4.4 samples to understand the new scene structure.
Related changes:
- Prefabs have been marked as obsolete and removed in version 4.6.
Remove the use of VIOCameraDeviceUnion. If you continue to use this component, warning logs will appear, containing brief instructions on how to replace it in the new plugin. It is recommended to refer to the version 4.4 samples to understand the new scene structure.
Related changes:
VIOCameraDeviceUnionhas been marked as obsolete and removed in version 4.6.
It is recommended to refer to the interface documentation in the scripts and the version 4.4 samples to understand interface changes and usage, and make appropriate adjustments.
Related changes:
- Some other script interfaces have also changed.
- Some public methods are marked as internal in XML comments. These interfaces should be avoided as they have been removed in version 4000.