Unity-Technologies / AssetGraph

Visual Workflow Automation Tool for Unity.
Other
1.13k stars 209 forks source link

Postprocess should handle all assemblies and create instance should use FullName #82

Closed hiroki-o closed 7 years ago

hiroki-o commented 7 years ago

Original report by guangyi mu (Bitbucket: idlestudios, ).


  1. In Postprocess, the original code use GetExecutingAssembly(), but it's possible there are other assemblies which implement IPostprocess interface to customize the logic. I would recommend to use AppDomain.CurrentDomain.GetAssemblies() instead.
  2. CreateInstance should use t.FullName since it's possible that "t" has namespace, etc.
hiroki-o commented 7 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/Hiroki Omae), ).


@idlestudios thank you for reporting this. There are a bunch of areas that tool access assembly info - I will fix this issue.

Meanwhile, I would like to make sure that I cover real use case scenario that requires this change. Would you be kind to provide me in which case you bumped into?

I imagine that this can be an issue if you have code implement interface in pre-built dll - anything else?

hiroki-o commented 7 years ago

Original comment by guangyi mu (Bitbucket: idlestudios, ).


Correct, my unity modules are pre-build dlls and would like to extend asset build process based on asset bundle graph tool.

hiroki-o commented 7 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/Hiroki Omae), ).


Solved this issue with 39a47c3 (in dev branch) Please confirm if it is fixed in your environment.