Dissonance icon indicating copy to clipboard operation
Dissonance copied to clipboard

Dissonance does not work well with Unity Package Manager

Open bockelie93 opened this issue 7 years ago • 3 comments

Context

With Unity Package Manager being a thing from 2018, I wanted to move Dissonance to a package. That means Dissonance wouldn't be located under Assets anymore.

Dissonance's settings assumes Dissonance is located under Assets, which doesn't work well with CheckInstallationLocation() in StartUp.cs. It shouldn't be required to keep the settings under the same folder as the rest of Dissonance.

Eventually, the whole Unity Store will be ported to use Unity Package Manager, so this will have to be looked into anyways.

Fix

StartUp.cs - CheckInstallationLocation():

  • Instead of determining the path, have it be provided by the user through a pop up.

##Workaround I simply commented out CheckInstallationLocation();, and added a hardcoded value "Assets/Dissonance".

Steps to Reproduce

https://gist.github.com/LotteMakesStuff/6e02e0ea303030517a071a1c81eb016e should guide you on how to set up local packages for the Unity Package Manager

Your Environment

  • Dissonance 6.2.0
  • Unity 2018.2.2f1

bockelie93 avatar Aug 08 '18 14:08 bockelie93

We actually used to have a hardcoded install location string which you could change if you installed elsewhere, just a few months ago we did away with it and added the automatic system in Startup.cs!

I've been working on Unity 2018.2 project recently, partly to learn all of this cool new stuff (e.g. assembly definitions, as mentioned in this other issue). I think I'm going to have to work out a completely new way to package the project on Unity 2018+ although that may require waiting a while for Unity to update some asset store publishing tools - for example at the moment I think the asset store tools assume Assets is the root of the project, in which case it's not possible for a package from the asset store to install somewhere which is not inside Assets (i.e. Packages).

Short term I'll be making sure Dissonance can be put into sensible assembly definitions (#101) and distributing them in the 2018 version of the package. Longer term we'll definitely want to exploit the package manager.

martindevans avatar Aug 08 '18 14:08 martindevans

Hi,

I don't think this issue is related to Assembly definition files. so it should be Reopened...

Any news on this topic ? I am using packages for my project and Dissonance is in one of my packages... But I get this error when I use the packaged version in another project: image

We fix it by changing code in Dissonance but it would be great that Dissonance gets compatible with Unity packages or better, that Dissonance gets distributed directly through packages ! Thanks!

cliv3dev avatar May 29 '20 13:05 cliv3dev

You're right, this is related to the way in which Dissonance locates itself at install time and then how it loads resources using the path it's located. Since you've opened a new issue (#196) I'll leave this one closed and we can start a clean thread over there :)

martindevans avatar May 29 '20 14:05 martindevans