UnityAssetCleaner
UnityAssetCleaner copied to clipboard
ArgumentException: Empty path name is not legal.
ArgumentException: Empty path name is not legal.
System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.IO.StreamReader..ctor (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
(wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string)
System.IO.File.ReadAllText (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
AssetClean.ShaderReferenceCollection.CheckReference () (at Assets/Cleaner/Editor/ShaderReferenceCollection.cs:65)
AssetClean.ShaderReferenceCollection.Collection () (at Assets/Cleaner/Editor/ShaderReferenceCollection.cs:26)
AssetClean.AssetCollector.Collection () (at Assets/Cleaner/Editor/AssetCollector.cs:35)
AssetClean.FindUnusedAssets.InitWithout () (at Assets/Cleaner/Editor/FindUnusedAssets.cs:38)
I managed to get it working by adding if (guid == "") continue; in the file ClassReferenceCollection.cs
void CollectionCodeFileDictionary (List<System.Type> alltypes, string[] codes)
{
float count = 1;
foreach (var codePath in codes) {
EditorUtility.DisplayProgressBar ("checking", "search files", count++ / codes.Length);
// connect file and classes.
var code = StripComment (System.IO.File.ReadAllText (codePath));
var guid = AssetDatabase.AssetPathToGUID (codePath);
if (guid == "") continue;
var typeList = GetTypeData (guid);
typeList.typeFullName.Clear ();
foreach (var type in alltypes) {