Giter VIP home page Giter VIP logo

Comments (7)

dantetam avatar dantetam commented on August 20, 2024 1

Hello @Zamaroht ,

Those are very interesting results, that makes sense it would only conflict with "default editor" plugins in the .unitypackage setup (and not Unity Package Manager). Let me discuss with my team about the best way to move forward. There's quite a bit of architecture that relies on the current file setup. Moving the files to Assets/Editor/Amplitude and ensuring the SDK still works will most likely be the best way forward. We're targeting 1-2 weeks for this change.

Thank you again for the thorough investigation.

Dante

from unity-plugin.

dantetam avatar dantetam commented on August 20, 2024

Hello @pgorrow ,

Thanks for the suggestion, this is a good thought. Just to clarify, why would this conflict with other Editor files in other asmdef declarations, like the other plugins example you mentioned? We actually did run into this issue when the asmdef file was named Assets/Editor/Editor.asmdef.

Dante

from unity-plugin.

pgorrow avatar pgorrow commented on August 20, 2024

The default behavior of the Editor folder is to have a dependency path to the rest of the assets folder. This allows you to create editor panels that interact with application scripts. The asmdef you added changes the default behavior of the editor folder and all folders beneath editor. As you suggested, other plugins that use an asmdef are unaffected. But most plugins that install in editor don't use an asmdef and many of them depend on the default dependency path.

In general, I'd advise against changing the behavior of default directories as it is bound to cause some people pain.

While I understand, you are using it to enforce modularity. An asmdef is mostly useful if you have a large body of code that takes significant time to compile and you want to limit how frequently it compiles.

from unity-plugin.

pgorrow avatar pgorrow commented on August 20, 2024

Since Editor is a special folder name (https://docs.unity3d.com/Manual/SpecialFolders.html) and you can have multiple Editor folders in a project. Another possible solution would be to create an Editor folder under Assets/Amplitude with your Editor resources. This would put put them in the same module created by AmplitudeSdkCore.asmdef and move more of your code into a single asmdef module.

from unity-plugin.

Zamaroht avatar Zamaroht commented on August 20, 2024

Hello. This is a problem when importing the plugin manually via the .unitypackage file.
Right now the unitypackage is importing the package.json file (which is irrelevant), and it's adding these two files:

Assets/Plugins/AmplitudeSDKPlugins.asmdef
Assets/Editor/AmplitudeSDKEditor.asmdef

The problem is that Assets/Editor and Assets/Plugins are commonly used folders for project code and other SDKs, and these asmdefs are blocking all the code inside these folders from seeing the rest of the project code, leading to compilation problems when importing the package in an existing project.

This shouldn't be a problem via Package Manager, but since .unitypackage seems to be supported this should be fixed.

from unity-plugin.

Zamaroht avatar Zamaroht commented on August 20, 2024

Just in case anyone else is experiencing compilation errors because of this after importing the .unitypackage, deleting both .asmdef files should fix it in the meantime.

from unity-plugin.

dantetam avatar dantetam commented on August 20, 2024

Hello @Zamaroht ,

Sorry for the delay. I'm going to experiment with not including the asmdef files in the unitypackage. Our old unitypackage file did not require them before. The asmdef files were made for Unity Package Manager. This might resolve all the issues

from unity-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.