Parse-for-Unity-2018
Parse-for-Unity-2018 copied to clipboard
Play mode works great. Doing a Windows or Android build throws this error -
Hello, Thanks for the awesome work! We are building on Windows 10 and are getting this error. We googled it and installed the iOS packages in Unity 2018.3.0f2 but are still getting this error:
Any thoughts on how we can resolve this and still keep the awesome parse-for-Unity-2018?
Assets\Plugins\Parse\Parse\Public\Unity\ParseInstallation.Unity.cs(47,17): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
Try to encapsulate where you call for IOS with:
#if UNITY_IOS Debug.Log("Iphone"); #endif
https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
Thanks for the response. I am just trying to get an example working and building to Windows x86 build.
Are you saying I should add encapsulation to the ParseInstallation.Unity.cs file which was downloaded as part of this library? I tried that and then got more build errors in PlatformErrors.Unity.cs when I do a build... I can keep following the trail of errors and add the encapsulation if you think it will eventually get this working and then I can do a pull request to update this library?
Thanks!
steps to reproduce errors:
- pull code from github
- create empty scene
- drop ParseInitializeBehavoir prefab into scene
- populate ParseInitializeBehavoir with AppId, c# id, and parse server
- add a simple button to create data on parse server like below code.
- test in editor (works great!) push the button; verify new data is on Parse Server. YAY.
- build to Windows x86 build. Get errors in original post above.
using UnityEngine; using Parse; using System.Threading.Tasks; public class ParseTest : MonoBehaviour { public async void createGameScoreParseServerAsync() { ParseObject gameScore = new ParseObject("GameScore"); gameScore["score"] = 1337; gameScore["playerName"] = "Sean Plott"; await gameScore.SaveAsync(); } public void pushbutton() { createGameScoreParseServerAsync(); } }