/****************************************************************************
* Copyright 2019 Nreal Techonology Limited. All rights reserved.
*
* This file is part of NRSDK.
*
* https://www.nreal.ai/
*
*****************************************************************************/
namespace NRKernal
{
using UnityEditor;
/// A tracking image database preprocess build.
internal class TrackingImageDatabasePreprocessBuild : PreprocessBuildBase
{
/// Executes the 'preprocess build' action.
/// Target for the.
/// Full pathname of the file.
public override void OnPreprocessBuild(BuildTarget target, string path)
{
var augmentedImageDatabaseGuids = AssetDatabase.FindAssets("t:NRTrackingImageDatabase");
foreach (var databaseGuid in augmentedImageDatabaseGuids)
{
var database = AssetDatabase.LoadAssetAtPath(
AssetDatabase.GUIDToAssetPath(databaseGuid));
TrackingImageDatabaseInspector.BuildDataBase(database);
database.BuildIfNeeded();
}
}
}
}