Assembly definition

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
forrestuv
Posts: 64
Joined: Tue Nov 06, 2018 11:28 am

Assembly definition

Post by forrestuv »

Hi,
can you please add an AssemblyDefinition to ur plugin?
Since ur plugin is huge, It would really speedup compile time cause Unity isn't forced to recompile it everytime for no reason.
thx ;)
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assembly definition

Post by Tony Li »

Hi,

It already has asmdefs. Look in Plugins/Pixel Crushers/Dialogue System/Scripts and import DialogueSystemAssemblyDefinitions.unitypackage.

The Dialogue System doesn't force devs to use asmdefs because too many asmdefs will slow down a project, and it's already compiled in the Plugins pass, so it doesn't affect compile times of anything that's outside of Plugins.
forrestuv
Posts: 64
Joined: Tue Nov 06, 2018 11:28 am

Re: Assembly definition

Post by forrestuv »

References to TextMeshPro are missing when using ur package.
Also can u point me where I can find info on slowdowns using asmdefs?

Below the results of the test I made using asmdef debugger


without
0,76s Assembly-CSharp.dll
compilation total: 0,76s
Assembly Reload Time: 7,6543012s

with
0,71s Assembly-CSharp.dll
compilation total: 0,71s
Assembly Reload Time: 7,5990176s
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assembly definition

Post by Tony Li »

Hi,

Some devs don't want to include TextMesh Pro in their projects, so the Dialogue System treats TextMesh Pro as an optional integration. If you've enabled the Dialogue System's TextMesh Pro integration, you must manually assign Unity.TextMeshPro to the PixelCrushers and DialogueSystem asmdefs. The same is true for any other optional Unity package integrations such as Cinemachine.

You can search the forums for benchmarks that people have run to test how the number of asmdefs in a project affects compile times. Once your project gets past ~30 asmdefs, the time Unity takes to determine the dependencies can sometimes take longer than just recompiling everything (disregarding the Plugins folder, which is essentially its asmdefs). This also depends on your version of Unity, since they've been improving the performance of asmdefs over time.
forrestuv
Posts: 64
Joined: Tue Nov 06, 2018 11:28 am

Re: Assembly definition

Post by forrestuv »

Ok thank you
SealDev
Posts: 85
Joined: Thu Jun 24, 2021 5:45 am

Re: Assembly definition

Post by SealDev »

You said: "it's already compiled in the Plugins pass, so it doesn't affect compile times of anything that's outside of Plugins."

Does this still apply if I created a bunch of scripts in the default "Assembly-CSharp" with refrences to either

"using PixelCrushers.DialogueSystem";
or
"using PixelCrushers";
and simple calls to DialogueLua?

Does this trigger a full recompile of the dialogue system?
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assembly definition

Post by Tony Li »

No, it doesn't recompile the Dialogue System in that case.
Post Reply