• Stars
    star
    250
  • Rank 161,683 (Top 4 %)
  • Language
    C#
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This tool finds unreferenced assets by scanning all files in your Unity project.

Dependencies Hunter Unity3D Tool unity

stability-stable License: MIT Maintenance

This tool finds unreferenced assets in Unity project.

All code combined into one script for easier portability. So you can just copy-paste DependenciesHunter.cs to your project in any Editor folder.

How it works

At first, it calls

AssetDatabase.GetAllAssetPaths()

to form a map of all assets.

Then it uses:

AssetDatabase.GetDependencies

to find dependencies for each of those assets. As a result dependencies map is formed.

Then it simply finds all assets which are not presented as a dependency within this map. Such assets considered as unused if they aren't marked as to be ignored in this analysis (by a list of RegExp patterns).

Addressables

To enable addressables usage uncomment the first line.

// #define HUNT_ADDRESSABLES

Ways of usage

The tool has two ways to use it. Each has a menu option, and an editor window.

To list all unused assets in your project..

..click on "Tools/Dependencies Hunter" option which will open the "AllProjectAssetsReferencesWindow" window.

plot

To list all references towards selected assets..

..select the assets and use a context menu option "Find References in Project". It will open the "SelectedAssetsReferencesWindow" window with the results.

Context Menu Result Window
plot plot

Settings

In the Analysis Settings foldout you can set files to be ignored by providing a list of RegExp patterns. You can also uncheck the 'Show Unreferenced Assets Only' toggle to view the list of all your project assets with their references number, files sizes etc.

Analysis Settings Listing all Assets
plot plot

Installation

  1. Through Unity's Package Manager. Use this as git url: https://github.com/AlexeyPerov/Unity-Dependencies-Hunter.git#upm. UPM support added via template.
  2. Or you can just copy and paste file DependenciesHunter.cs inside Editor folder

Contributions

Feel free to report bugs, request new features or to contribute to this project!

Other tools

Missing References Hunter

To find missing or empty references in your assets see Missing-References-Hunter.

Textures Hunter

To analyze your textures and atlases see Textures-Hunter.

More Repositories

1

Unity-MissingReferences-Hunter

Finds all missing references in your project. Reads contents of assets to detect whether GUIDs they contain exist within the project.
C#
20
star
2

crunch_textures

Check and resize textures to work with Crunch compression (multiple of 4 width and height requirement)
Dart
6
star
3

Unity-Textures-Hunter

Provides summary of all textures and atlases in Unity project
C#
5
star
4

LogKeeper-Flutter-Firebase

Log snapshot management solution (iOS/Android/Web/Server) built with Flutter/Dart using Bloc pattern and Firebase Firestore backend.
Dart
5
star
5

monday_slack_unfurl

Slack App for monday.com links unfurling using AWS Lambda & JavaScript
JavaScript
3
star
6

Flutter-Notes

An example Flutter Notes management app backed by Firebase Firestore and Async Redux
Dart
2
star
7

FireShift

Flutter + Nest.js AWS Lambda + mongoDB (Mongoose) tool for getting user feedback
Dart
2
star
8

proviso

A complete set of Flutter tools for conditional rendering (if-else and switch conditions), subtree wrapping with a parent widget, and some handy shortcuts (like DebugWidget, WebOnlyWidget, SafeBuilder, and many more).
Dart
2
star
9

Sample-Dart-Console-App

A sample Dart command-line application that performs replace operations e.g. package name change.
Dart
1
star
10

LogKeeper-SwiftUI

This is a sample iOS native app for sharing logs. SwiftUI, Redux, Firebase/Firestore
Swift
1
star
11

Monday.com-Auto-ID-generator

This tool can be used as a WebHook for Monday.com to assign Auto Incremeted IDs to pulses. Designed to be deployed on AWS Lambda. Has a few additional APIs for manual usage.
JavaScript
1
star