Struggling a lot with references and asmdef files

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dralks
Posts: 44
Joined: Mon May 24, 2021 6:19 pm

Struggling a lot with references and asmdef files

Post by Dralks »

First of all, Tony, man, you have the best costumer service that I have ever seem, I literally talk about you at work, I have been reading your answers for days, and boy do you put effort, I really didn't want to give you anything to answer at all, but I'm afraid that I have been stuck on this all day.

My project is divided in a few different projects separate by asmdfe files, to reference PixelCrushers I needed to separate it in asmdfe files too (right?), with that I started the journey of dealing with asmdfe files and editors folders to end up with this.

Image

Everything went "great" (I'm having to create more asmdfe files than I would like to) until I reached one file in particular in 'Wrappers > Editor > CustomLuaFunctionInfo' , this file is using another file with the same name that is in another editor folder , which makes it impossible to access because I cannot (apparently) reference 2 editor asmdfe, I got it working by moving CustomLuaFunctionInfo (wrappers) into that editor folder ''Dialogue System> Scripts> Editor', but then even when everything works and I have no errors my dialog trigger component looks all messed up

Image

I must be doing something wrong and probably over complicating this.

How can I reference the PixelCrushers project into another project without end up with 236512346 asmdfe files? I tried to use only one at the top level, which works great but 100% crashes everything when I build the project because of the editor folders.

if asmdfe files are the only option how should they reference each other.

Image
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Struggling a lot with references and asmdef files

Post by Tony Li »

Hi,

CustomLuaFunctionInfo was accidentally put in the wrong folder in its initial release. It has since been moved. If you're using an older version, or if you originally imported an older version and subsequently imported an update on top of it, the file may be in the wrong place still. Normally you can import Dialogue System updates right on top of the existing installation. But, in this specific case, you need to either manually move or delete the file so the import will put it in the correct place.

Also, the Dialogue System comes with premade asmdefs. You can import them from this package:

Assets / Plugins / Pixel Crushers / Dialogue System / Scripts / DialogueSystemAssemblyDefinitions.unitypackage

It will import 5 asmdefs that cover all of the scripts included in the Dialogue System:
  • PixelCrushers
  • PixelCrushersEditor
  • PixelCrushersWrappersEditor
  • DialogueSystem
  • DialogueSystemEditor
Note: If you enabled options such as TextMesh Pro support, you'll need to assign a reference to the TextMeshPro asmdef to the asmdefs.
lgarczyn
Posts: 30
Joined: Fri May 05, 2023 5:28 am

Re: Struggling a lot with references and asmdef files

Post by lgarczyn »

Would it be possible to include packages that Reference the input system And/Or TextMeshPro ?

It would be nice to have some advice on how to get custom CustomFieldTypeService to work with asmdef (right now I use assembly references)

Asmdef files are the industry standard for large projects, and the dialog system is huge and slow to compile. This should be setup in the wizard.
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Struggling a lot with references and asmdef files

Post by Tony Li »

Hi,

There are infinite number of combinations given that developers and other asset publishers can define their own asmdefs, not just the ones that come with Unity. So a "one click" wizard is not possible. However, the Dialogue System does come with asmdefs. Import Plugins > Pixel Crushers > Dialogue System > Scripts > DialogueSystemAssemblyDefinitions.unitypackage. Since the Dialogue System is self-contained, generally you only need to add Unity.TextMeshPro to them if you've enabled TextMesh Pro support. (If you're using Yarn 2 import in the upcoming version 2.2.37+, you'll also need to add the Yarn asmdefs.) Other than that, you'll only need to add the Dialogue System asmdefs to other asmdefs if they need to reference the Dialogue System.
Post Reply