blueberryzzz / referencefinder Goto Github PK
View Code? Open in Web Editor NEW这是一个用来查找资源引用和依赖的插件,通过缓存来保存资源间的引用信息,通过树状结构直观的展示。
License: MIT License
这是一个用来查找资源引用和依赖的插件,通过缓存来保存资源间的引用信息,通过树状结构直观的展示。
License: MIT License
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in :0
at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) [0x0001e] in <cfc149f8218b496788d8493c87de777a>:0 at ReferenceFinderData+<WriteToChache>c__AnonStorey1.<>m__0 (System.String s) [0x00007] in C:\S1\S1_Client_PC\S1\Assets\AliothEditor\Editor\ReferenceFinder\ReferenceFinderData.cs:167 at System.Linq.Enumerable+SelectListIterator
2[TSource,TResult].ToArray () [0x00034] in <389a581424f249b6bfedc5bb6d85fb6d>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <389a581424f249b6bfedc5bb6d85fb6d>:0
at ReferenceFinderData.WriteToChache () [0x000fe] in C:\S1\S1_Client_PC\S1\Assets\AliothEditor\Editor\ReferenceFinder\ReferenceFinderData.cs:167
at ReferenceFinderData.CollectDependenciesInfo () [0x0009e] in C:\S1\S1_Client_PC\S1\Assets\AliothEditor\Editor\ReferenceFinder\ReferenceFinderData.cs:39
Unity2020.3.13
The first time I use ReferenceFinder in a project, I get "KeyNotFoundException: The given key was not present in the dictionary."
If you comment out the try/catch, you can see that it's from ReferenceFinder\ReferenceFinderData.cs:60
assetDict[assetGuid].references.Add(asset.Key);
Probably just needs to use TryGetValue instead of [].
Seen on Unity 2019.4.16.
System.Runtime.Serialization.SerializationException: Type UnityEngine.Hash128 is not marked as Serializable.
at System.Runtime.Serialization.Formatters.Binary.BinaryCommon.CheckSerializable (System.Type type, ISurrogateSelector selector, StreamingContext context) [0x0002c] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryCommon.cs:119
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.GetObjectData (System.Object obj, System.Runtime.Serialization.Formatters.Binary.TypeMetadata& metadata, System.Object& data) [0x00054] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:386
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObject (System.IO.BinaryWriter writer, Int64 id, System.Object obj) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:306
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectInstance (System.IO.BinaryWriter writer, System.Object obj, Boolean isValueObject) [0x00062] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:293
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteValue (System.IO.BinaryWriter writer, System.Type valueType, System.Object val) [0x0006b] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:748
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteGenericArray (System.IO.BinaryWriter writer, Int64 id, System.Array array) [0x000e3] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:519
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray (System.IO.BinaryWriter writer, Int64 id, System.Array array) [0x00085] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:471
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectInstance (System.IO.BinaryWriter writer, System.Object obj, Boolean isValueObject) [0x0004f] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:290
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteQueuedObjects (System.IO.BinaryWriter writer) [0x00005] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:271
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectGraph (System.IO.BinaryWriter writer, System.Object obj, System.Runtime.Remoting.Messaging.Header[] headers) [0x0001f] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:256
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers) [0x000a4] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:232
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:211
at ReferenceFinderData.WriteToChache () [0x00143] in D:\WorkProjects\EditShot\Assets\Editor\ReferenceFinder\ReferenceFinderData.cs:173
at ReferenceFinderData.CollectDependenciesInfo () [0x0009e] in D:\WorkProjects\EditShot\Assets\Editor\ReferenceFinder\ReferenceFinderData.cs:39
UnityEngine.Debug:LogError(Object)
ReferenceFinderData:CollectDependenciesInfo() (at Assets/Editor/ReferenceFinder/ReferenceFinderData.cs:47)
ReferenceFinderWindow:InitDataIfNeeded() (at Assets/Editor/ReferenceFinder/ReferenceFinderWindow.cs:63)
ReferenceFinderWindow:FindRef() (at Assets/Editor/ReferenceFinder/ReferenceFinderWindow.cs:38)
我在一个新项目,使用了您的项目,出现了上述错误,向您请教一下。
例如场景的LightingData.asset会引用场景,那么在查找引用资源的时候就会死循环,场景引用data,data再指向场景
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in :0
at ReferenceFinderData.UpdateReferenceInfo () [0x00037] in **\Assets\Editor\ReferenceFinder\ReferenceFinderData.cs:60
at ReferenceFinderData.CollectDependenciesInfo () [0x000c0] in **\Assets\Editor\ReferenceFinder\ReferenceFinderData.cs:43
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
to resolve:
in ReferenceFinderData.UpdateReferenceInfo()
foreach(var assetGuid in asset.Value.dependencies)
{
if (assetDict.ContainsKey(assetGuid))
assetDict[assetGuid].references.Add(asset.Key);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.