Browse Source

Rework configuration

Nick Steyer 1 year ago
parent
commit
d5ef3d907a

+ 8 - 0
Assets/StreamingAssets.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7bc48953f797c1a48b931d5e2bcc627e
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/StreamingAssets/StreetLight.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7bfbdfec7fd836e4281650a8d6485d6f
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 3 - 0
Assets/StreamingAssets/StreetLight/Configuration.json

@@ -0,0 +1,3 @@
+{
+	"HomographyFilePath" : "C:\\Users\\nick.steyer\\SmartStreetLight\\StreetLight\\SampleCalibration\\homography.csv"
+}

+ 0 - 0
Assets/StreetLight/Configuration.json.meta → Assets/StreamingAssets/StreetLight/Configuration.json.meta


+ 1 - 1
Assets/StreetLight/Configuration.cs

@@ -27,7 +27,7 @@ namespace Assets.StreetLight
 
         private static readonly Lazy<Configuration> lazy = new(() =>
         {
-            var dataPath = new DirectoryInfo(Application.dataPath).FullName;
+            var dataPath = new DirectoryInfo(Application.streamingAssetsPath).FullName;
             var configFilePath = Path.Combine(dataPath, "StreetLight", "Configuration.json");
             return JsonConvert.DeserializeObject<Configuration>(File.ReadAllText(configFilePath));
         });

+ 0 - 3
Assets/StreetLight/Configuration.json

@@ -1,3 +0,0 @@
-{
-	"HomographyFilePath" : ".\\Assets\\StreetLight\\homography.csv"
-}