About Video Fingerprints and obtaining them.
Video Fingerprints are the files that enables the library to identify the desired video, they are the key to unlocking AR content. Inside the SDK we already added the fingerprints for this demo video: SDK sample content V1 Fingerprints are unique for every video. The free version of our SDK includes fingerprinting of a 1 minute video of your choice. In order to obtain Fingerprints for your video, please contact us!
Setup the Unity SDK
First of all, you need to get all the necessary objects added to the scene.
- Open your scene or create a new one
- Kickstart the SDK from the Unity menu by following ARTV Tools → Initialize ARTV Session
ARTV Configuration Window will pop up and default EditorConfigurationPreset is being applied adding all required objects to the scene. You can pin configuration window somewhere along the editor tabs for further access. Also, it can be reopened at any time via ARTV Tools → Open Configuration Window.
EditorConfigurationPreset is tailored for working on the experience within the Unity Editor. In order to launch your experience on the device you need to apply runtime configuration preset prior to build (along with a couple of other configurations mentioned in a ‘Pre-build setup’ chapter):
- Open ARTV Configuration Window.
- Select RuntimeARConfigurationPreset from the dropdown on the top of the window.
- Click Apply.
Note, that you can also save your own custom presets, however configuring ARTV can be quite tricky and we recommend using preconfigured presets unless you got a good grasp on how everything works.
Adding your first game object
Now let’s make first steps with some of the core concepts you will be dealing while using ARTV SDK. Once you initialized the ARTV session do the following:
Create an empty game object that will serve as a root object for your synchronizable content.
GameObject → Create emptyName it appropriately (e.g. Content). This object is a “folder” in which all of your experience’s content will dwell.
Now right-click on it and create some primitive inside the root object.
3D Object → CubeThis will become your first synchronizable content object.
Add DefaultTimelineContentSynchronization behavior to this object through the Inspector:
Add Component → DefaultTimelineContentSynchronization
Inside the component you’ll see a property called Intervals.
Expand it (if needed)
Set the Size property to 1.
A single Interval entry will appear. Set its values in order to create a time interval at which this object should become active. For example:
a. Start = 3
b. End = 5.
TimelineContentSynchronization components define time intervals (at source video’s own timeline) at which certain game objects (and their children) should become active or idle.
Note: If some of those child objects happen to have their own *TimelineContentSynchronization* component, they will turn on at specified intervals irregardless of parent's object current state
TimelineContentSynchronization components may contain multiple intervals (specified by Size property of the interval list) and combined with hierarchical structure of Unity scenes, this provides minimalist yet quite powerful arrangement possibilities.
Testing using in-scene editor
You can test how your content timeline behave inside the Editor without the need to create a build or even obtaining offline fingerprints for your particular video.
In the Hierarchy tab locate the search input field.
Type in TimelineContentSynchronizationRegistry and select it.
In the Inspector you should see a Content Switches Edittime Operator component with a warning message box stating:
Content container is not found.
Drag and drop your content root object into Content Transform field of that component. Alternatively, you can click the little dotted circle on the right hand side of the field and select your content root object from the Scene tab.
Warning message will be replaced with the time slider.
By moving the slider you should observe the synchronizable primitive appear in appropriate time-frames conforming with the intervals defined in its content switcher component.
Note: You do not need to enter Play mode in order to use this feature, as it is meant to be used in Edit mode