Migrate Unity applications from EasyAR Sense Unity Plugin 4.2 and earlier
Starting from version 4.3, the Unity plugin is distributed and managed through Unity Package Manager, and the plugin package structure has been adjusted significantly. Therefore, when upgrading from 4.2 or earlier to 4.3 or later, some extra steps are required.
Migration steps
When upgrading from version 4.2 or earlier, you need to:
- Delete all files of the old plugin. These files 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.
Migrate to 4000 and later
Migrating to 4000 and later requires the following changes.
Refer to Create and configure AR session to recreate the scene structure.
Related changes:
- prefab has been removed.
VIOCameraDeviceUnionhas been removed.
To use AR Foundation, refer to Enable AR Foundation in an EasyAR project.
Related changes:
- AR Foundation support has been reimplemented.
You cannot use EasyAR on XREAL X and XREAL Light devices. 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 built into EasyAR Sense and supports XREAL Air2 Ultra.
Refer to Migrate to 4000 for the next migration work.
Version 4000 has more changes compared with 4.x.
Migrate to version 4.6
Warning
Version 4.6 is no longer maintained. It is recommended to upgrade to 4000 or later directly. The detailed Unity development documentation on the EasyAR website is prepared for version 4000 and later.
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 to recreate the related components.
Related changes:
- prefab has been removed.
VIOCameraDeviceUnionhas been removed.- AR Foundation support has been split into an independent package.
If AR Foundation is not needed, you can delete the AR Foundation node under AR Session in the scene and remove the use of ARFoundationFrameSource in code.
Related changes:
- AR Foundation support has been split into an independent package.
If Nreal is not needed, you can delete the Nreal node under AR Session in the scene and remove the use of NrealFrameSource in code. When using Nreal, you no longer need to create a virtual package.
Related changes:
- Nreal support has been split into an independent package.
It is recommended to refer to the API documentation in the scripts and the version 4.6 samples to understand API changes and usage, and make appropriate adjustments.
Related changes:
- Some other script APIs have also changed.
- Some public methods are marked as internal in XML comments. Avoid using these APIs. They have been removed in version 4000.
Migrate to version 4.4
Warning
Version 4.4 is no longer maintained. It is recommended to upgrade to 4000 or later directly. The detailed Unity development documentation on the EasyAR website is prepared for version 4000 and later.
When migrating to version 4.4, pay attention to the following changes.
Remove references to prefabs inside the plugin package as much as possible. If you continue to use these prefabs, warning logs will be displayed, and the logs contain brief guidance 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:
- prefab has been marked obsolete and was removed in version 4.6.
Remove the use of VIOCameraDeviceUnion. If you continue to use this component, warning logs will be displayed, and the logs contain brief guidance 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 obsolete and was removed in version 4.6.
It is recommended to refer to the API documentation in the scripts and the version 4.4 samples to understand API changes and usage, and make appropriate adjustments.
Related changes:
- Some other script APIs have also changed.
- Some public methods are marked as internal in XML comments. Avoid using these APIs. They have been removed in version 4000.