Closed step4 closed 5 years ago
Ah yep, unfortunately I've never updated the Readme.md to be more concrete on how to build the unity support branch. I'll bring that one up to date as soon as I can.
The dotnet build Parse.sln
guide is the one which applies for the master branch.
To get the assemblies for unity support you need to build either the Debug-Unity oder Debug-UnityEditor configuration or both.
Which configuration you need to build depends on which context you want to use Parse in. If you need it to run from editor scripts there are minor differences which will be build with the Debug-UnityEditor configuration, if you need it solely in runtime (play-mode is considered runtime) Debug-Unity is the configuration you need to build.
This results in slighly different build commands dotnet build Parse.sln -c Debug-Unity
and dotnet build Parse.sln -c Debug-UnityEditor
This more obvious to notice when opening the solution within Visual Studio and I must admit I did not think about the command line build guide at this point.
Thanks, compilation worked and the previous error disappeared.
You're welcome, I've changed the respective Readme.md to include a hint for that.
I'm experiencing a similar error using the code in the above-mentioned fork.
NullReferenceException: Object reference not set to an instance of an object Parse.Internal.AppInformation.get_Build () (at /Users/pshannon/Downloads/Parse-SDK-dotNET-feature-recode-unity-support 3/Parse/Internal/Utilities/AppInformation.cs:31) Parse.ParseClient+Configuration+VersionInformation..cctor () (at /Users/pshannon/Downloads/Parse-SDK-dotNET-feature-recode-unity-support 3/Parse/Public/ParseClient.cs:136) Rethrow as TypeInitializationException: The type initializer for 'VersionInformation' threw an exception. Scene.Start () (at Assets/Scene.cs:27)
I've tried using a configuration to Initialize, that includes VersionInformation, but it doesn't affect the error. I'm using Unity 2019.3.0f6. Would very much appreciate any assistance.
(Also, I have tried building using all of the relevant targets in Visual Studio - Debug-Unity, Debug-UnityEditor)
@pshannon1000 Could you please make a new issue for your case as it affects a different version of Unity and your stack trace does differ quite a bit. I'll then take a look at it as soon as I have some spare time.
Thanks TobiasPott - I did end up being able to get my Parse / Heroku / Mailgun set-up working in Unity after about 3 days. I would post my solution here to help others, but at this point I honestly can hardly keep all the parse SDK versions and solutions I tried straight... it does work in the most recent version of Unity however, after hours and hours of trial and error.
Ok, ended up having to get into this today again, because the Parse framework was getting an Access Denied error when I trying running my build on iOS...
All of the errors I've experienced so far can be traced back to the AppInformation.cs file.
First, it needs access to UnityEngine.dll to build properly. Following these instructions can help fix that: https://www.what-could-possibly-go-wrong.com/unity-and-dlls/ "The first thing we need to do is add a reference to the Unity DLL. To do this you must copy the DLL from your Unity installation to the project that will reference it. To find the DLL go into your local Unity installation (for me that is C:\Program Files\Unity) and navigate to the sub-directory Editor\Data\Managed. Here you will find UnityEngine.dll."
After copying the DLL to the Parse SDK build folder, add a Reference to UnityEngine.dll in the Parse Visual Studio solution.
I am using the fork https://github.com/TobiasPott/Parse-SDK-dotNET/tree/feature/recode-unity-support
I build it with
dotnet build Parse.sln
and copy the content ofParse/bin/Debug/netstandard2.0/
into a folder in the Unity project assets.When I try tu run
I get the error:
On this issue TobiasPott mentioned he got it working on 2019.1.0.
Is there something I am missing?