Placeholder-Software / Dissonance

Unity Voice Chat Asset
69 stars 5 forks source link

Dissonance does not work well with Unity Package Manager #111

Open bockelie93 opened 5 years ago

bockelie93 commented 5 years ago

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():

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

martindevans commented 5 years ago

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.

cliv3dev commented 4 years ago

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!

martindevans commented 4 years ago

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 :)