summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs')
-rw-r--r--WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs b/WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs
index 0ce796e..aa0c925 100644
--- a/WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs
+++ b/WorldlineKeepers/Assets/Scripts/Tools/CSVReader.cs
@@ -4,6 +4,7 @@ using Newtonsoft.Json.Serialization;
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Linq;
using System.Net.Mime;
using System.Reflection;
using UnityEngine;
@@ -50,8 +51,17 @@ public class CSVReader
Type type = typeof(T);
for (int i = 1; i < m_Rows.Count; ++i)
{
- if (m_Rows[i][0][0] == '#') // ×¢ÊÍ
+ if (m_Rows[i] == null || m_Rows[i].Count == 0) // ¿ÕÐÐ
continue;
+
+ bool isBlank = true;
+ m_Rows[i].ForEach(s => { if (!string.IsNullOrEmpty(s)) isBlank = false; });
+ if (isBlank)
+ continue;
+
+ if (m_Rows[i][0].Length > 0 && m_Rows[i][0][0] == '#') // ×¢ÊÍ
+ continue;
+
List<string> row = m_Rows[i];
T obj = new T();
foreach (var key in m_KeyMapping)