Hi there,
I'm in the process of building a custom Saver class to save some game data properties in my game. Im modeling off of your existing Savers (positionSaver, activeSaver, etc). My unity Asset scripts are separated into multiple assemblies for organizational purposes.
My problem is that one of my script assemblies depends on the DialogueSystem assembly. But this new custom Saver which lives in the DialogueSystem assembly needs to reference the classes in my assembly, and it can't because I would have a circular dependency.
What do you guys recommend when users write custom classes in your plugin (Savers, SequencerCommands, etc) and they need to access custom classes in their unity Assets folder? Im struggling because Im running into a lot of these circular dependencies with the plugin. But there doesn't seem to be a clean way to get the plugin code and my code all in one assembly.
I would love to hear what you guys have to say!
Thanks,
-David
Custom Saver Needs to Reference my Assemblies
-
- Posts: 3
- Joined: Wed Mar 08, 2023 11:12 pm
Re: Custom Saver Needs to Reference my Assemblies
Hi,
If you're not using assembly definition files (asmdefs), put your own scripts, including custom savers, in a folder outside of Plugins. (More info: Script compilation order and Plugins)
If you are using asmdefs, put your own scripts in one of your asmdef folders whose asmdef references the PixelCrushers and DialogueSystem asmdefs.
If you're not using assembly definition files (asmdefs), put your own scripts, including custom savers, in a folder outside of Plugins. (More info: Script compilation order and Plugins)
If you are using asmdefs, put your own scripts in one of your asmdef folders whose asmdef references the PixelCrushers and DialogueSystem asmdefs.
-
- Posts: 3
- Joined: Wed Mar 08, 2023 11:12 pm
Re: Custom Saver Needs to Reference my Assemblies
Thanks for replying,
I am using asmdefs.
Ah so you're saying those custom Savers or sequencerCommands can live outside the pixel crushers folder and asmdef as long as that folder references pixelCrushers/dialogueSystem? That's good news. I can probably re-organize differently knowing that.
I'll try it and let you know!
I am using asmdefs.
Ah so you're saying those custom Savers or sequencerCommands can live outside the pixel crushers folder and asmdef as long as that folder references pixelCrushers/dialogueSystem? That's good news. I can probably re-organize differently knowing that.
I'll try it and let you know!
-
- Posts: 3
- Joined: Wed Mar 08, 2023 11:12 pm
Re: Custom Saver Needs to Reference my Assemblies
Tony,
That was the right way to do it. I made a folder that is dedicated to custom DialogueSystem scripts that references the Dialogue System and my script's asmdefs. Thanks so much for your quick help!
That was the right way to do it. I made a folder that is dedicated to custom DialogueSystem scripts that references the Dialogue System and my script's asmdefs. Thanks so much for your quick help!
Re: Custom Saver Needs to Reference my Assemblies
Glad to help!