Skip to content

Commit

Permalink
log duplicates for IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
krasnotsvetov committed Oct 9, 2019
1 parent bb8ba2b commit 59eb73b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Application.PersistentMap;
using JetBrains.Collections;
using JetBrains.Diagnostics;
Expand All @@ -7,11 +9,14 @@
using JetBrains.Serialization;
using JetBrains.Text;
using JetBrains.Util;
using JetBrains.Util.Logging;

namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.Caches.UnityEditorPropertyValues
{
public class SceneHierarchy
{
private static readonly ILogger ourLogger = Logger.GetLogger<SceneHierarchy>();

public readonly Dictionary<FileID, IUnityHierarchyElement> Elements = new Dictionary<FileID, IUnityHierarchyElement>();

private readonly Dictionary<FileID, FileID> myGameObjectsTransforms = new Dictionary<FileID, FileID>();
Expand Down Expand Up @@ -46,8 +51,12 @@ public void AddSceneHierarchyElement(Dictionary<string, string> simpleValues, Di
var anchor = simpleValues.GetValueSafe("&anchor");
if (string.IsNullOrEmpty(anchor))
return;


var id = new FileID(null, anchor);
if (Elements.ContainsKey(id))
ourLogger.Verbose($"Id = {anchor.Substring(0, Math.Min(anchor.Length, 100))} is defined several times for different documents");

var correspondingId = GetCorrespondingSourceObjectId(referenceValues);
var prefabInstanceId = GetPrefabInstanceId(referenceValues);
bool isStripped = simpleValues.ContainsKey("stripped");
Expand Down

0 comments on commit 59eb73b

Please sign in to comment.