From ebee93d107f894d04865e4cb49ca186e84d2da59 Mon Sep 17 00:00:00 2001 From: max Date: Sun, 30 Jul 2023 01:47:12 +0200 Subject: [PATCH] Update ScenePartitionSO.cs --- Editor/ScenePartitionSO.cs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Editor/ScenePartitionSO.cs b/Editor/ScenePartitionSO.cs index 54ae701..373878d 100644 --- a/Editor/ScenePartitionSO.cs +++ b/Editor/ScenePartitionSO.cs @@ -164,14 +164,10 @@ public void Save() string id = match.Groups[1].Value; ulong objectId = ulong.Parse(id); - string extraInfo = ""; - if (TryGetObjectInfo(in sceneData, in sceneObjectNameById, i, lastIndex, objectId, out string objectInfo)) - { - extraInfo = $"-{objectInfo}"; - } + GetObjectInfo(in sceneData, in sceneObjectNameById, i, lastIndex, objectId, out string objectInfo); // Write data to disk. - File.WriteAllLines($"{dataPath}/{SceneName}-{id}{extraInfo}.yaml", sceneData[i..lastIndex]); + File.WriteAllLines($"{dataPath}/{SceneName}-{id}{objectInfo}.yaml", sceneData[i..lastIndex]); } lastIndex = i; @@ -489,9 +485,9 @@ private bool TryGetObjectTypeName(string data, out string objectTypeName) return true; } - private bool TryGetObjectInfo(in string[] sceneData, in Dictionary sceneObjectNameById, int index, int lastIndex, ulong objectId, out string objectInfo) + private void GetObjectInfo(in string[] sceneData, in Dictionary sceneObjectNameById, int index, int lastIndex, ulong objectId, out string objectInfo) { - using ProfilerUtility.ProfilerScope profilerScope = new(nameof(TryGetObjectInfo)); + using ProfilerUtility.ProfilerScope profilerScope = new(nameof(GetObjectInfo)); objectInfo = ""; @@ -560,16 +556,11 @@ private bool TryGetObjectInfo(in string[] sceneData, in Dictionary