Hi,
According to the documentation :
But what about putting AssetPostprocessor code into a custom package, is it safe ? (as far as I know pacakges are compiled into dll in Library folder)
Hi,
According to the documentation :
But what about putting AssetPostprocessor code into a custom package, is it safe ? (as far as I know pacakges are compiled into dll in Library folder)
Bump
I think the idea is that if thereās a compiler error then it wonāt import the asset correctly. And if thereās a compile error in the scripts, then custom packages wonāt be built, either. So I think the ābest practiceā would be to make a DLL of it. You can just take the DLL from the Library/ScriptAssemblies folder which will work. I think.
As I understand it, the dll format is recommended because dll code is always executed where scripts code can be skipped if there are compile errors. With that in mind Iām still confused about scripts code inside a packageā¦I think Unity will try to build package as dll and execute them regardless of compile errors raised in the main assembly but Iām not sure.
Bump, any precision would be appreciated.
OK; just tested it*, and YES a package is fine. Package DLLs are built first even if the main assemblies have compile errors.
Since youāre here, do you know if thereās a way to toggle on and off an asset postprocessor per file? I only want my PP to run on some files. Thanks!
Thanks for your reply !
Unfortunately, I know nothing in the API that allows you direct control over PostProcess for a specific asset. However here is some tricks you can use to do this: