The env object is created but is "empty". If I instead do UnityPy.load(str(bundle)), everything works as expected. The issue is probably not related to bundles specifically, and should be reproducible with any asset file.
The function expects either a str, bytes, or binaryio input, or a list of one of these types, and not Path.
As you already noticed yourself, wrapping it in str fixes your problem.
Bug There is a check in
Environment
constructor:, which causes this code to fail to load a bundle file:
The
env
object is created but is "empty". If I instead doUnityPy.load(str(bundle))
, everything works as expected. The issue is probably not related to bundles specifically, and should be reproducible with any asset file.UnityPy: 1.10.1