Playnite Forums
Playnite integration into Unity - Printable Version

+- Playnite Forums (https://playnite.link/forum)
+-- Forum: Development (https://playnite.link/forum/forum-10.html)
+--- Forum: Extensions (https://playnite.link/forum/forum-5.html)
+--- Thread: Playnite integration into Unity (/thread-474.html)



Playnite integration into Unity - nostalgicbear - 11-17-2020

Hi all,
I was looking to import the Playnite.dll into Unity but I can not get Unity to accept the dll. When I download the package from NuGet, it says that the only dependency is NewtonsoftJSON, which itself imports perfectly fine in to Unity. However when I import the Playnite.dll, I get the following error:

Unable to resolve reference 'PresentationFramework'. Is the assembly missing or incompatible with the current platform?

If I then import the PresentationFramework.dll, it simply starts a process whereby after that is imported then says it needs PresentationCore, which then needs System.Printing, etc until eventually there are countless Microsoft dlls in the project that dont seem to know about each other. This approach of adding these dlls seems wrong anyway as NewtonSoftJSON is listed as the sole dependency. 

Has anyone been able to successfully import the Playnite.dll into Unity, and if so is there any info/a guide on how best to approach this?

Thank you


RE: Playnite integration into Unity - Crow - 11-17-2020

1) Why do you want to do this?
2) It will not work. Playnite targets .NET Framework, while Unity runs on customized version of Mono which doesn't support parts of Framework that Playnite needs (WPF).
3) There's no nuget for Playnite.dll, only for SDK and that one has to be loaded by Playinte, it's not meant to be used by 3rd party apps, only for Playnite extension development.


RE: Playnite integration into Unity - nostalgicbear - 11-17-2020

Thank you for the reply.

I was looking to try and integrate it into a Unity project I currently have, in order to add the ability to find the various different libraries one might have on their PC (GOG, Epic, Steam etc) so all the users games can be displayed in my project. Right now I display Steam games only but was hoping to expand that to other libraries. I was hoping that Playnite was perhaps something I could use to help achieve that but clearly I misunderstood. I had hoped that using .Net 4.0 and IL2CPP that it may have been possible.
Thank you again for the reply and explanation.