Smart AR� Third Release 3.0.1 - May 2022
Official Documentation
by Matej Vanco
robot model by RunemarkStudio
Content
Introduction
Smart AR is a simple AR editor at runtime supported by AR Foundation; 3rd party library. Calibrate, edit and store your scene at runtime in your mobile device with user-friendly controls and modular navigation.
Smart AR is a production-ready asset tested by many clients on public events. The editor consists of settings that allow you to move, rotate and scale existing objects in your scene. Editor also contains additional features such as��• Scene Streaming (save/load edited progress - objects’ transform only [Position, Rotation, Scale & Activation])�• Performance Statistics (full stats of application performance including memory allocation, fps, device info and more)�• UI Manager (tracks UI elements in 3D space)�• Object Observer (observe any object with your finger in your AR application at runtime)
Smart AR is especially made for non-markable AR applications, that means, it doesn’t need any AR markers. But if your application requires markers, it will work either. Smart AR is ready for beginners, non-programmers & designers.
The main purpose was to create a simple plugin that would provide quick edits at runtime directly on the place of happening.
Realtime Editor
Smart AR allows you to edit your AR application right after startup. Realtime editor is located in AR Manager script which manages all the systems. Simply drag and drop the AR Manager to any empty object, assign AR session and select objects you would like to edit at runtime.
Click on the video and check the official documentation of the Realtime Editor.
If you would like to avoid watching the video, you can simply drag and drop the created prefab in the package which is fully ready editor for your application with all UI elements.
API - AR Manager
AR Manager is an essential component of the whole Smart AR package. It manages realtime editor, editor UI, calibration, sends events to streaming component and activates performance stats. It’s possible to connect most of the functions with UI events, which allow you to be more compact and modular.
ar_ResetARCore - restart & re-calibrate AR application
ar_ProcessToGyroCalibration - show calibration process UI and re-calibrate
arEditor_SelectObject(GameObject obj) - select specific object manually�arEditor_DeselectObject - deselect object manually (if possible)
arEditor_OnOff(bool OnOff) - enable/disable ar editor
arEditor_ChangeMoveRotMulti(Slider s) - change movement/rotation multiplication�arEditor_ChangeScaleMulti(Slider s) - change scale multiplication�arEditor_ChangeObjectSize(bool add) - change object size��arEditor_ChangeXYDimension(bool XY_) - change movement dimension to XY/XZ�arEditor_ChangeToRotationMode(bool rotMode) - change to rotation mode�arEditor_ChangeAlign(bool align) - change to Align From Users View or vice-versa�arEditor_ChangeAlignSwitch - same function as above, but switches between true/false�arEditor_ChangeObjectActivation (bool state) - change the selected object’s activation state�arEditor_ResetTrans(int tType) - reset object transform (0-pos,1-rot,2-scale)�arEditor_RefreshHierarchy - refresh editor hierarchy UI�arEditor_AddObjectToHierarchy(GameObject gm) - add custom object to hierarchy manually�arEditorInternal_DebugInfo(string text) - display debug info (if possible)
API - AR Streaming
AR Streaming is a file-streaming system for saving/loading editor progress at runtime. Save & load your edited progress any time on any device with readable database structure and customizable file name, extension and directory root name.
AR Streaming allows you to save just basic transform properties - object Position, Rotation, Scale & Activation.
ARSave - Save current editor progress
ARClearAllData - Clear current editor progress (if possible)
ARLoad- Load saved editor progress (if possible)
The AR Streaming requires AR Manager script.
Database structure�Position Rotation Scale Activation
API - AR Performance Stats
AR Performance Stats allows you to track & view current application performance. In short - “pseudo” realtime profiler.
Contains:�• FPS�• FPS in ms�• total memory allocation�• current memory allocation�• mono memory allocation�• OS info�• CPU info�• total ram�• GPU info�• Screen info
ShowHideGUI - Show/Hide Performance Stats GUI
The AR Performance Stats does not require any component. Can be used in any scene.
Additionals
Smart AR package contains a few additional scripts that open new opportunities for your AR application (or even any application/game).
AR Object Observer�The script allows you to ‘observe’ any object. The selected object will simply follow your main camera by specific depth and smooth value. User is able to rotate the object with finger by specific speed. �The script had been used in production as an ‘object observation’ for AR application on a public event & museum.
AR UI Manager�UI Manager manages 2D UI elements in 3D space. It simply tracks specific UI elements to the objects in 3D space.
The script had been used in production as an ‘image tracker’ for AR application on a public event.
Calibration
AR Manager contains a feature called Calibration which consists of many settings that can be set up. Calibration is a simple process that resets the AR Session system and reloads AR editor. �It is required in SmartAR if you are using non-marker system.
The Calibration UI can be fully customized.
Advanced Settings
If enabled, the system will start a timer when the device is in idle mode (The device is not rotating). If the timer reaches the specific number, the calibration panel will appear... [When the user might keep the device in 'steady' mode? For example keeping the device in one place or putting it on a table - the potential AR targets might be lost and your scene may be broken. Applications on the public (museums, public meetings) might require such an option].
If enabled, the system will start a timer when the device is facing down - the gyroscope values are zero. If the timer reaches the specific number, the calibration panel will appear... [It's a similar option as above, however the device must be facing down. For example putting the device on the ground or table facing down - the potential AR targets might be lost and your scene may be broken. Applications on the public (museums, public meetings) might require such an option].
Quick AR Setup
Quick summary of the AR setup for Unity 2019 and newer.
AR Setup Video-Docs
AR Setup - Video documentation
FAQ
Production Use
Smart AR package had been used in commercial application for slovak gas industry SPP. The application is focused on environment problems, especially lack of bees population in Slovakia. You can observe bees, their life, why we need them, what they are good for and why they are so important. The application was successful and clients were very glad to have such an editor in mobile devices to edit whole scene right on the place of happening.
Thank you!
I hope the documentation was useful.�If you have any issues, questions or suggestions, join my official discord server below!�[Just click the discord logo]
If you don’t like Discord, you can contact me here (may take longer than discord!)