Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized package structure #86

Closed

Conversation

haitheredavid
Copy link
Contributor

@haitheredavid haitheredavid commented Nov 8, 2022

Shifted the package structure around so the connector looks similar to hierarchy of speckle-sharp, so it looks like:

-Speckle Connector 
\-Editor
\-Runtime
  \-Objects
      \-Lib
  \-Core 
    \-Lib

Moving all the runtime scripts into a separate folder will give a lil boost to the unity compiler time. Next step would be to organize the scripts to live in their respective folders

@JR-Morgan
Copy link
Member

Hi @haitheredavid,
This is a really nice thought, and I like your approach.

On another branch #88, I have made some other structural changes. So I decided it would be easier for me to recreate your changes on that branch, instead of merging these.

I have replicated your suggestion of Editor and Runtime folders, this has indeed tidied up the code a fair bit.

I have one question, Objects and Core, you place under a libs folder, with an assembly def. Is there any reason for this? I didn't think assembly defs interact with pre-comiled DLLs in any way? I may be wrong here.

I would love to hear your thoughts, and if you were interested in the other assembly structure changes I've made in #88

@haitheredavid
Copy link
Contributor Author

👋🏻 @JR-Morgan
branch #88 looks good to me 👍🏻 I like seeing the main scripts being organized into their respective folders, makes the unity dev life easier. There are some pieces to consider though, and it sorta addresses the question you have with the Lib folders.

The Core and Objects folders would hold more than just the plugin data, it would be an individual unity package that hold also the scripts and components necessary for that package. The Lib folder is just a designated location for all the plugin data to live. They actually don't need to live there, I just prefer to have them organized in their individual folders since each file generates their own .meta file in unity. Makes things easier to update when doing CI 💩.

But to keep digging into why I was building these as individual packages, take a look at the connector I've been building there are three main unity packages that can be installed, com.speckle.core , com.speckle.objects, and com.speckle.connector. This replicates the same structure speckle-sharp has and it aims to allow any curious dev the ability to extend objects or core pieces without breaking the connector. My only goal with this was to make the converter interfaces (IComponentConverter) extendable, so if someone wanted to modify how a converter worked in the main connector they could achieve that via script or editor. Or if they wanted to publish their converter for others to use they could by only referencing the com.speckle.objects in their unity project.

@JR-Morgan JR-Morgan added this to the 2.11 milestone Nov 21, 2022
@JR-Morgan JR-Morgan closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants