From fbb4da7234fcc6a48a41d31f40c88597f027679f Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Fri, 18 Oct 2019 13:49:56 +1100 Subject: [PATCH] Fixed map generation bug in build --- .../Data/Networking/Server/Realtime/ClientList.asset | 4 ++-- Assets/Prefabs/Map Sections.meta | 2 +- Assets/Prefabs/Map Sections/Link Sections.meta | 2 +- Assets/Prefabs/Map Sections/Link Sections/Width 3.meta | 2 +- .../Link Sections/Width 3/Links Width 3.asset | 2 +- Assets/Prefabs/Map Sections/Link Sections/Width 5.meta | 2 +- Assets/Prefabs/Map Sections/Link Sections/Width 7.meta | 2 +- Assets/Prefabs/Map Sections/Width 3.meta | 2 +- Assets/Prefabs/Map Sections/Width 5.meta | 2 +- Assets/Prefabs/Map Sections/Width 7.meta | 2 +- Assets/Scripts/Components.meta | 8 -------- Assets/Scripts/Map Generation/MapManager.cs | 10 ++++++++++ ProjectSettings/EditorBuildSettings.asset | 2 +- 13 files changed, 22 insertions(+), 20 deletions(-) delete mode 100644 Assets/Scripts/Components.meta diff --git a/Assets/Data/Networking/Server/Realtime/ClientList.asset b/Assets/Data/Networking/Server/Realtime/ClientList.asset index b985f26..73aec80 100644 --- a/Assets/Data/Networking/Server/Realtime/ClientList.asset +++ b/Assets/Data/Networking/Server/Realtime/ClientList.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e3ee5388094941012a17d8eac09e9009610e3bcbcb69a307ce928fbc133b6d3c -size 834 +oid sha256:b2d4e5d52fe4b9a4ff81ec251ae4b118ef7bdaca621d06b8a50e28ccbc3d58ec +size 1142 diff --git a/Assets/Prefabs/Map Sections.meta b/Assets/Prefabs/Map Sections.meta index 91b76d0..cba6cb9 100644 --- a/Assets/Prefabs/Map Sections.meta +++ b/Assets/Prefabs/Map Sections.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 02cb3bc94f6ea564282cfab54ac02081 +guid: 9ccca7fe12b66c748a5a5deb7b2f76a9 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Link Sections.meta b/Assets/Prefabs/Map Sections/Link Sections.meta index 5c9a15d..ddaf9a3 100644 --- a/Assets/Prefabs/Map Sections/Link Sections.meta +++ b/Assets/Prefabs/Map Sections/Link Sections.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f3435feddeac6804d925665e946b7889 +guid: d0e4fbe9f973dac48ae44482231ecb54 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 3.meta index 1910f53..28dfd18 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 3.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e80d9da4ab4709349853d1d94ec2f5bc +guid: 8b4ac71416e88764698072d971a82ece folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Links Width 3.asset b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Links Width 3.asset index 848ab76..782c090 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 3/Links Width 3.asset +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 3/Links Width 3.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d65de061d4f63a78cf690a857a995ac935600a10d782b406291434338cbae97c +oid sha256:7a361758c9e8f7c8d71cc1785afe15dc83aeb817316d19d2314ab2b59e00649e size 1247 diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 5.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 5.meta index 3e7cde2..7a19fd1 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 5.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 5.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3fae17509e7b2ad4095b67299bb42d54 +guid: d1c1c068cb0915d43895246db8cc1255 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Link Sections/Width 7.meta b/Assets/Prefabs/Map Sections/Link Sections/Width 7.meta index 2b59528..f5350c8 100644 --- a/Assets/Prefabs/Map Sections/Link Sections/Width 7.meta +++ b/Assets/Prefabs/Map Sections/Link Sections/Width 7.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 19edafca7bb8ad04c8ff800b7e327847 +guid: e7a8a255c71b20043b26dbb38acdb9fd folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Width 3.meta b/Assets/Prefabs/Map Sections/Width 3.meta index 621f154..13254ac 100644 --- a/Assets/Prefabs/Map Sections/Width 3.meta +++ b/Assets/Prefabs/Map Sections/Width 3.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: be25a323ad5fce04d9ff37db05f30f0c +guid: 8da6cd64c5d76294ba0e9eb4b900a7d0 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Width 5.meta b/Assets/Prefabs/Map Sections/Width 5.meta index 2f4cfe4..077e0f7 100644 --- a/Assets/Prefabs/Map Sections/Width 5.meta +++ b/Assets/Prefabs/Map Sections/Width 5.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 133135fd929067542b7d8569d59baffe +guid: f668f6cc52da363418a15103b96bef75 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefabs/Map Sections/Width 7.meta b/Assets/Prefabs/Map Sections/Width 7.meta index 0ef2cb6..26c43ee 100644 --- a/Assets/Prefabs/Map Sections/Width 7.meta +++ b/Assets/Prefabs/Map Sections/Width 7.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c5c0eafef3eaaa546b62feb0d5339f09 +guid: ad716d5d8c9d4e942a68cda4ac2a96cd folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/Components.meta b/Assets/Scripts/Components.meta deleted file mode 100644 index 5a95b09..0000000 --- a/Assets/Scripts/Components.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8d7394d70ec233849a60a26da5f23b75 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Map Generation/MapManager.cs b/Assets/Scripts/Map Generation/MapManager.cs index 804edea..7052f1c 100644 --- a/Assets/Scripts/Map Generation/MapManager.cs +++ b/Assets/Scripts/Map Generation/MapManager.cs @@ -168,8 +168,18 @@ public class MapManager : ScriptableObject updateCriteria(); //We update the section selection criteria for the current gamestate + Debug.Log("Sections length:" + sections.Count); + int count = -1; + foreach (MapSection section in sections) { + count++; + if (section == null) + { + Debug.Log("Section is empty [" + count + "]"); + continue; + } + if (section.weight > 0 && checkSegments(section)) { //If a segment is a valid continuation of the current most-recent segment, add it to the list diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 8723bc5..a06026b 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:311b07fad584c7efab0db86403282740a1f83d1675bdef7d87fc1875870dc88a +oid sha256:89626e954c478d28ed17bbfc46452669c9cb4d5ced3c8e3e886ed6191cf54b15 size 1383