Closed vinaysshenoy closed 6 months ago
I would guess that the pipeline runs mostly in native so you can't do much directly from managed code. You should be able to use the same technique as doorstop to hook into the filesystem functions though, but that's just general dll override stuff.
I am trying to build something that needs to load before the Unity editor starts importing assets on launching a project. The gist is that I want to intercept any file system API calls which the Unity editor makes and capture some information when it does. I could override the calls to the file system API via reflection, but the editor does not seem to way to hook into the editor launch pipeline.
Unity does have an
[InitializeOnLoad]
functionality, but that only starts executing after the asset database refresh completes, so it does not work for my use case. I am wondering if I could use this to run code before the editor starts importing the project.