Skip to content

Commit

Permalink
Merge pull request #25 from innogames/unity2019-compatibility
Browse files Browse the repository at this point in the history
Unity2019 compatibility
  • Loading branch information
JohannesDeml authored Apr 26, 2024
2 parents 2141e69 + d6a03f2 commit 53c38aa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions NodeDependencyLookup/Editor/NodeHandler/AssetNodeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public bool IsNodePackedToApp(Node node, bool alwaysExcluded = false)
public bool IsNodeEditorOnly(string id, string type)
{
var path = AssetDatabase.GUIDToAssetPath(NodeDependencyLookupUtility.GetGuidFromAssetId(id));
return path.Contains("/Editor/", StringComparison.Ordinal);
return path.Contains("/Editor/");
}

public void InitNodeCreation()
Expand Down Expand Up @@ -283,7 +283,7 @@ private bool IsSceneAndPacked(string path)

private bool IsInResources(string path)
{
return path.Contains("/Resources/", StringComparison.Ordinal);
return path.Contains("/Resources/");
}
}
}
4 changes: 2 additions & 2 deletions NodeDependencyLookup/Editor/NodeHandler/FileNodeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public bool IsNodePackedToApp(Node node, bool alwaysExcluded)
public bool IsNodeEditorOnly(string id, string type)
{
var path = AssetDatabase.GUIDToAssetPath(id);
return path.Contains("/Editor/", StringComparison.Ordinal);
return path.Contains("/Editor/");
}

public Node CreateNode(string id, string type, bool update, out bool wasCached)
Expand Down Expand Up @@ -309,6 +309,6 @@ private bool IsSceneAndPacked(string path)
return false;
}

private bool IsInResources(string path) => path.Contains("/Resources/", StringComparison.Ordinal);
private bool IsInResources(string path) => path.Contains("/Resources/");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,13 @@ private static string GetAssetDatabaseVersion1LibraryDataPath(string guid)
public static bool IsNodePackedToApp(Node node, NodeDependencyLookupContext stateContext,
Dictionary<string, bool> checkedPackedStates)
{
if (!checkedPackedStates.TryAdd(node.Key, false))
if (checkedPackedStates.ContainsKey(node.Key))
{
return checkedPackedStates[node.Key];
}

checkedPackedStates.Add(node.Key, false);

var nodeHandler = stateContext.NodeHandlerLookup[node.Type];

if (nodeHandler.GetHandledNodeType().Contains(node.Type))
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**3.0.2**
- Regression from 3.0.1 - Revert changes that are not 2019.4 compatible

**3.0.1**
- Improve string comparison and allocations for faster processing
- Cleanup naming "pathes" -> "paths"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.innogames.asset-relations-viewer",
"displayName": "Asset Relations Viewer",
"description": "Editor UI for displaying dependencies between assets in a tree based view",
"version": "3.0.1",
"version": "3.0.2",
"unity": "2019.4",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit 53c38aa

Please sign in to comment.