|
Post by hsallander on Oct 16, 2020 17:07:30 GMT
Hi,
I read in the forums that you abandoned the use of asmdef's due to the fact that it didn't reduce the compile time. Afaik the compile time for the MA code for instance shouldn't be reduced as such, but the system can via the dependency graph understand that some code doesn't need to recompile every time when you only change stuff in another part of the code. Anyway, we're heavily depending on MA in our projects in my studio (thanks for a great plugin!) and we're in the process of packaging some of our commonly used classes into utils libraries using Unity Packages. Unity Packages need to be in Assembly definitions, and for them to be able to reference certain other code in a project that code also needs to be in assembly definition files. So for our utils packages to work with MA we need MA to be it's own asmdef so that we can add a reference to it (eg to DarkTonic.MasterAudio) Is there any possibility you might reconsider and add an assembly definition file in the project? I don't really see any drawbacks for people who are not needing it, but the benefits for us that are building our pipeline around it are are huge. I know we can just add our own asmdef file, but it seems like something we'll probably forget half the time when we update the plugin in our projects and seems like a cleaner solution that it's included directly in the plugin code instead.
Thanks!
|
|
|
Post by DarkTonic Dev on Oct 16, 2020 23:05:41 GMT
I'd really rather not. I would ask why you need to do all that though when our code lives in the Plugins folder and already will never recompile unless you change code in the Plugins folder, which is rare since your game's code doesn't live there. That's why I put it in there.
Also, not sure what you mean by this: "Unity Packages need to be in Assembly definitions", because I know I've exported lots of code without asmdef files before, hundreds of times in fact.
What Unity version did asmdef's first come out in by the way?
-Brian
|
|
|
Post by hsallander on Oct 17, 2020 9:03:56 GMT
Hi! To clarify I mean Unity packages as in the more modern way of packaging stuff in Unity, via the Unity Package Manager, not the older .unitypackage file format. One benefit for instance of using the package manager to distribute your packages and their updates is that it makes updating packages more robust, you don't get into the problems of having to remove old files that might be obsolete or files that have been renamed etc.
What are the drawbacks from your end of adding an asmdef file? The only possible drawback I can see is that you can't access the projects code from the plugin, which you of course don't do anyway. But it gives benefits for us and other developers building stuff to distribute via the Unity Package Manager so we can build our own extensions and utils that use the MA classes.
Also, Unity are building better and better support for using the UPM for distributing your own packages, via ssh+git etc, so I think developer will want to use it more and more going forward.
Asmdef's first came out in Unity 2017.3
|
|
|
Post by DarkTonic Dev on Oct 17, 2020 17:58:01 GMT
So the drawback if it still works the same is it actually increased compilation time by about 20%.
Also, I'll have to create something like 4 asmdef's for each plugin due the editor / relations inspector integration etc.
I'll give it a shot again and see how it goes. Buttom line, if I'm not able to install 2 of our plugins in a project and get it to compile with asmdef's, I will not release asmdefs. The Relations Inspector part may be a problem because it exists in both Core GameKit and Master Audio.
Also, if it still increases compile time, I hate that and that's very important to me and many others.
Thanks, -Brian
|
|
|
Post by hsallander on Oct 17, 2020 21:43:27 GMT
Ok thanks for looking into it!
|
|
|
Post by DarkTonic Dev on Oct 17, 2020 22:13:52 GMT
Sure thing.
|
|
|
Post by hsallander on Oct 18, 2020 9:24:30 GMT
Hi again, just a thought - if you don't find it's beneficial enough for all users to add it to the plugin, maybe you could add a setting in the Master Audio Manager to have it generated just for the users who need it. Anyway, thanks again for looking into it. Have a nice weekend!
|
|
|
Post by DarkTonic Dev on Oct 18, 2020 16:52:54 GMT
Yeah, I had a thought to have a package for them if there are any downsides such as compile time. We're on the same page here.
|
|
|
Post by DarkTonic Dev on Oct 19, 2020 23:43:39 GMT
So yeah I had to not include it in the default installation. There are now 2 separate packages you can install in the Assets\Plugins\DarkTonic\MasterAudio\AssemblyDefinitions folder. 1 for Master Audio alone. A different one if you have both Core GameKit and Master Audio, because you can't define a separate asmdef for a folder that exists on each of them and still compile. Here's the 2 of those if you want to try it out before the next update comes out. MA_asmdefs.unitypackage (787 B) MA_plus_CGK_asmdefs.unitypackage (1 KB)
|
|
|
Post by hsallander on Oct 20, 2020 6:37:47 GMT
That's great news. Thank you very much!
|
|
|
Post by DarkTonic Dev on Oct 20, 2020 16:01:57 GMT
No problem.
|
|