Giter Site home page Giter Site logo

unityassetcleaner's People

Contributors

mikegeig avatar tatsuhiko-unity avatar tsubaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unityassetcleaner's Issues

Help~!

Why is there only one option available for my import project and nothing in it

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)

display assets in hierarchy

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

Absolute path information is required

It occurs when I click "Window\Delete Unused Assets\unused by editor":

arg1

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)

vs1

Ctrl C Ctrl V and works!thank you@Flongo28 is kind of right. Here is how I fixed it for me within the project without specifying an absolute path.

          @Flongo28 is kind of right. Here is how I fixed it for me within the project without specifying an absolute path.
  1. Install the unitypackage if not done already: Rightclick on the Asset Folder in the Project View -> Import Package \ Custom Package -> select cleaner.unitypackage downloaded from this git.
  2. Locate the ClassReferenceCollection.cs at <project root dir>\Assets\Cleaner\Editor\ClassReferenceCollection.cs
  3. Change the 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.

  1. 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.

  2. Save and go back to the Editor -> Window -> Delete Unused Settings.

  3. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.