tsubaki / unityassetcleaner Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Why is there only one option available for my import project and nothing in it
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)
Yo, Thanx for the plugin! it is awesome
It would be nice to display unused assets in a hierarchy (like in import dialog). This way it would be easier to select assets we'd like to keep in the project
It occurs when I click "Window\Delete Unused Assets\unused by editor":
ArgumentException: Absolute path information is required.
Parameter name: assemblyFile
System.Reflection.Assembly.LoadFile (System.String path, System.Security.Policy.Evidence securityEvidence) (at :0)
System.Reflection.Assembly.LoadFile (System.String path) (at :0)
AssetClean.ClassReferenceCollection.collectionAllFastspassClasses () (at Assets/Cleaner/Editor/ClassReferenceCollection.cs:244)
AssetClean.ClassReferenceCollection.CollectionFiles () (at Assets/Cleaner/Editor/ClassReferenceCollection.cs:91)
AssetClean.AssetCollector.Collection (System.String[] collectionFolders) (at Assets/Cleaner/Editor/AssetCollector.cs:59)
AssetClean.FindUnusedAssetsWindow.InitWithout () (at Assets/Cleaner/Editor/FindUnusedAssetsWindow.cs:38)
@Flongo28 is kind of right. Here is how I fixed it for me within the project without specifying an absolute path.
cleaner.unitypackage
downloaded from this git.<project root dir>\Assets\Cleaner\Editor\ClassReferenceCollection.cs
CollectionAllClasses
function. There needs to be absolute references, not relative as the LoadFile
function gets a.t.m..Here is what the function should look like:
List<System.Type> CollectionAllClasses ()
{
List<System.Type> alltypes = new List<System.Type> ();
string projectPath = Path.GetDirectoryName(Application.dataPath);
string assemblyPath = Path.Combine(projectPath, "Library/ScriptAssemblies/Assembly-CSharp.dll");
if (File.Exists(assemblyPath)) {
alltypes.AddRange(Assembly.LoadFile(assemblyPath).GetTypes());
}
if (isSaveEditorCode)
{
string editorAssemblyPath = Path.Combine(projectPath, "Library/ScriptAssemblies/Assembly-CSharp-Editor.dll");
if (File.Exists(editorAssemblyPath))
alltypes.AddRange(Assembly.LoadFile(editorAssemblyPath).GetTypes());
}
return alltypes .ToList ();
}
You may copy and overwrite your definition with the given code.
If not done so, make a backup of your asset and library folder! It killed all urp shaders because i did not uncheck them in the process.
Save and go back to the Editor -> Window -> Delete Unused Settings.
Profit.
I do not have the time to make this a pull request. If someone does so, I would highly appreciate that.
Originally posted by @MatthiasPopp in #3 (comment)
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.