Import Activity Window (2021.2.0a19 and up)

Import Activity Window

The Asset Database holds a lot of information about the state of your project which has not been available to users in the past. Being able to answer questions such as “why did my asset re-import”, or “how long did this asset take to import” are all questions that come up too often and a good answer is hard to get without investing some time into each individual situation. In order to improve this, we’ve created the Import Activity Window!

Using this window, inspecting what the AssetDatabase knows about a particular asset in detail is now possible, and the possibility for a further self-diagnosis will be made possible.

Accessing the Import Activity Window
New window and context menus have been added to Unity that will allow you to use the Import Activity Window.

Window → Analysis → Import Activity Window

This will show the Import Activity window with the Overview for a project selected by default.

Right Click on an Asset → View in Import Activity Window

Inspector Menu → View in Import Activity Window

Below are some of the main features of the Import Activity Window:

Overview Panel

The overview is meant to provide high level information on which assets either took the longest to import, or have the most dependencies. This will help to surface the most expensive items both for import time, but also as a way to verify which assets are susceptible to being reimported as their number of dependencies increases.

Asset List
The following information is available, in sortable columns:

  • See when assets were imported

  • Show how long it took to import each asset and sort by import duration

  • See which Importer was used to import a particular asset

  • Clicking an asset will then show the Asset Details panel, where you can see:

  • Its GUID

  • When it was imported

  • How long it took to import (and comparison to the previous import, if applicable)

  • Reasons for import

  • Produced files in the Library folder

  • A searchable & sortable list of dependencies

There are many more features available within the window, and we look forward to hearing your feedback on it, and we’re also happy to answer any questions you may have.

30 Likes

Bump!

3 Likes

It looks super interesting, but we’re not in a position to try to update a big project that would need it right now.

3 Likes

Looks amazing to be honest :smile:

2 Likes

Would it possible to have this as a package, and use it in older (LTS) releases? Because this looks like a life saver.

4 Likes

@TJHeuvel-net good question!
We didn’t make this a package on purpose because the internal data structures that it depends on are tied to the AssetDatabase and that’s built into the Editor, so they’re quite tightly coupled. The upside is that the window should “always” be compatible with whatever editor you’re on (from 2021.2.0a19 onwards).

However, if the demand is high enough we could do something with the Databases themselves, such that the Databases could be exported to an intermediary format which this window (or other tools) could then load, but there’s no plans for that just yet.

3 Likes

Hello. I have some feedback.

Would be nice to copy asset info fields (like GUID, Path, etc).
Also, need more info about Duration 23 ms (-50%). It is not clear where this -50 % came from.
I didn’t find the option to hide Editor Assets from the Import Activity assets list.

Hey @IAndrewNovak !
Thanks for the feedback.

Sure thing, we can make those fields copyable :slight_smile:

The -50% comes from comparing the import duration to the previous import duration of that asset. I didn’t mention it in the original post because it was getting a bit long, but in the options dropdown you can enable “Show Previous Imports” and that will add a new list of imports to the window that you can browse :slight_smile:

Currently all Assets show up, but I guess you want to only see assets under the “Assets/“ folder? Might be good to have a toggle for showing package assets, so we don’t clutter the view.

2 Likes

Thanks for the reply.
Yes. I want to only see assets under the “Assets/“ folder.

The reason is the most interesting part to me. Once the project reimported everything after we updated TextMeshPro package. Would’ve been interesting to see why Editor decided to do that.

My understanding is that whenever a new C# based asset postprocessor appears (or disappears), all assets are reimported. They kinda have to if you’re going for 100% consistency (since asset postprocessor could potentially alter the imported result of any asset).

Now, TextMeshPro does contain an asset postprocessor, I think (why, I don’t know).

That probably would explain it.

1 Like

Makes sense, Possibly either had one and got removed or added one. It shouldn’t have reimported everything, but I guess that’s a limitation of the meta-data kept for imported assets to avoid reimporting them.

1 Like

Is this information accessible via editor scripting API too?

Hi @Peter77 ,

The APIs & the datastructures are marked as internal currently, so you could access them for testing with the right .asmdef, but we still kept them that way so that they can be changed, if necessary, before we make them public.

2 Likes

Hi Javier, no offense to you directly, but Unity has along history of putting out cool tools that don’t scale well and are super non performant.

Can you set this up in a way that it doesn’t take forever to load the screen, handles 120,000 assets gracefully (NO MASSIVE SCROLL BARS), doesn’t memory alloc the entire application to death and repaints efficiently?

2 Likes

I’d organize it by folder, at least when ordering by name.

Using UI Toolkit for everything (not just some things) and virtualizing the asset list should do it. Hell, it seems that most leaf nodes in this window are IMGUIContainers. There should be misleading advertisement penalties for companies that don’t use their own products.

1 Like

IMGUIContainer is a unity “product”…

Is that a joke that I don’t get? The quotes make it seem so.

No joke. There is no meaning behind what you said. They are using a unity made tool on a way they intended it. IMGUIContainer is a tool in a big, complex set of tools which allows us (and them) to use code made a while ago play along with the new system while everyone rewrite their systems to use the new one. It’s software engineering 101. You don’t migrate everything at once, especially not in a complex software like unity. But you already know all of this, why do I have to spell this out?

UI Elements was added as experimental in 2017.1 and released in 2019.1, it seems. If they’ve updated their Mono fork in a few months, they can rewrite the Console window with UI Toolkit in 2 years. Different teams, but you get the idea. Console, Project, Hierarchy, Game, Lighting… all still pure IMGUI. The longer they keep piling changes up on the old codebase, the worse an eventual rewrite gets.

I’m sure that you get the sentiment: Acme releases this product that’s gonna fix everything and it’s utterly broken because they haven’t felt the pain of using it for any serious project.