unity-plugin icon indicating copy to clipboard operation
unity-plugin copied to clipboard

Assembly Definition files are missing

Open halfgrey opened this issue 3 years ago • 2 comments

Expected Behavior

When Unity developers use assembly definition files they should be able to add a reference to the Amplitude assembly definition files so that they can use the SDK. For example AmplitudeSDKCore.asmdef

Current Behavior

The assembly definition files are missing since they are filtered by the .gitignore file. Only the .meta files are still existing.

Possible Solution

Remove asmdef filter from .gitignore and commit asmdef files again so that developers can reference and use the SDK code.

Steps to Reproduce

  1. Create a new empty Unity Project with an example script.
  2. Create an assembly definition file next to that script and name it whatever you like. For example. com.Company.Example
  3. Import Amplitude via Package Manager and the git url
  4. Try to use amplitude in your script (ERROR: You won't be able to use the amplitude c# code as you would need to reference for example AmplitudeSDKCore.asmdef to com.Company.Example.

Environment

  • Amplitude SDK Version: 2.6.0
  • Device: Unity Editor 2021.3.1f1

halfgrey avatar Oct 10 '22 13:10 halfgrey

Had to create asmdef myself. Took me about 1 minute, but should be there in the 1st place. PS if will be fixed, plz add the fix also to v2.6.0-no-edm branch/tag

shamruk avatar Feb 06 '23 21:02 shamruk

Hi @shamruk thanks for the heads up on this. Glad you found a workaround. We have this in our backlog but do not have an ETA for the fix.

justin-fiedler avatar Apr 27 '23 22:04 justin-fiedler

This is still broken and means importing via a package is impossible

lordmortis avatar Jun 28 '24 02:06 lordmortis

This should be fixed in version 2.8.0. @lordmortis - can you please confirm where you're seeing this?

If you're using the unitypackage file, you can find all the different versions here: https://github.com/amplitude/unity-plugin/releases/tag/v2.8

For direct loading from UPM, you can use the following branch main, main-without-edm-and-dependency or main-without-edm

Can you please confirm if you're seeing an issue with these branches as well?

izaaz avatar Jul 02 '24 16:07 izaaz

Looking at the main branch on GitHub, I can see the assembly definitions are back

However I’m not sure using the main branch is ideal as if a new version is marked main it is likely that unity will upgrade the package next time it refreshes (as it will use the branch/tag) - so to make the time-frame more controllable for us, we really need the tags.

2.7.0 and 2.6.0 both have corresponding -no-edm-and-dep and -no-edm tags (but those versions are missing the assembly references)

Do you know what Unity’s behaviour is when the tag/branch specified in the manifest updates in git? Will it just auto-update?

I can just use 33720007dc6dd7a1d0a3f41292554ea504894524 as that’s the main-without-edm-and-dependency for 2.8.0 - but it’s definitely less than ideal.

On 3 Jul 2024, at 0:47, Izaaz Yunus wrote:

This should be fixed in version 2.8.0. @lordmortis - can you please confirm where you're seeing this?

If you're using the unitypackage file, you can find all the different versions here: https://github.com/amplitude/unity-plugin/releases/tag/v2.8

For direct loading from UPM, you can use the following branch main, main-without-edm-and-dependency or main-without-edm

Can you please confirm if you're seeing an issue with these branches as well?

-- Reply to this email directly or view it on GitHub: https://github.com/amplitude/unity-plugin/issues/116#issuecomment-2203812077 You are receiving this because you were mentioned.

Message ID: @.***>

!DSPAM:66842f2a96921247212145!

lordmortis avatar Jul 03 '24 03:07 lordmortis

Can confirm that using 33720007dc6dd7a1d0a3f41292554ea504894524 at least compiles in unity (though the asset definition changed from the version we were on). I haven't built this just yet, but this is further that I was getting before.

lordmortis avatar Jul 03 '24 03:07 lordmortis

Using the hash isn't the cleanest thing to do. I've added two new tags

v2.8.0-no-edm-and-dep and v2.8.0-no-edm

izaaz avatar Jul 04 '24 11:07 izaaz

Thank you! Hopefully that will make it clearer for others!

lordmortis avatar Jul 05 '24 01:07 lordmortis

Thank you @lordmortis. Please feel free to reopen this issue if you're running into more problems with this.

izaaz avatar Jul 08 '24 14:07 izaaz