Documentation for the Unity C# Library
Loading...
Searching...
No Matches
ScenarioBuildPreprocessor.cs
Go to the documentation of this file.
2#if UNITY_EDITOR
3using UnityEditor;
4using UnityEditor.Build;
5
6namespace PixoVR.Event.ScenarioEditor.Build
7{
8 public class ScenarioBuildPreprocessor : IPreprocessBuild
9 {
10 public int callbackOrder { get; }
11
12 public void OnPreprocessBuild(BuildTarget target, string path)
13 {
14 var scenariosData =
15 AssetDatabase.LoadAssetAtPath<ScenariosDataSO>(
16#if LightsInspection
17 $"{ScenarioEditorWindow.ScenariosRootPath}/LightsInspection.asset"
18#endif
19
20#if BrakesInspection
21 $"{ScenarioEditorWindow.ScenariosRootPath}/BrakesInspection.asset"
22#endif
23
24#if InVehicleInspection
25 $"{ScenarioEditorWindow.ScenariosRootPath}/InVehicle.asset"
26#endif
27 );
28 scenariosData.Validate();
29 }
30 }
31}
32#endif