Unity SDK Issue

689 views
Skip to first unread message

Sebastian Maj

unread,
Apr 25, 2016, 8:53:59 PM4/25/16
to back{4}app
Hello, I am trying to use back{4}app with Unity. I have it all set up but it won't connect or it just won't send the object. I will paste my code below, all help will be greatly appreciated.

// Use this for initialization
   
void Start ()
   
{
       
ParseClient.Initialize(new ParseClient.Configuration {
           
ApplicationId = appID,
           
WindowsKey = dotnetKey,
           
Server = serverURL
       
});

       
StartCoroutine(testObject());
   
}

   
// Test Function
   
IEnumerator testObject()
   
{
       
yield return new WaitForSeconds(10.0f);

       
ParseObject testObj = new ParseObject("Test");
        testObj
["Testvalue"] = "Testy";
        testObj
.SaveAsync();

       
Debug.Log("New Object Created");
   
}

All help will be greatly appreciated!

Davi Macêdo

unread,
Apr 27, 2016, 1:19:25 AM4/27/16
to back{4}app
Hi, Sebastian. What is the error you have? Best.
Message has been deleted

Sebastian Maj

unread,
Apr 27, 2016, 4:37:48 PM4/27/16
to back{4}app
No errors just doesn't seem to be connecting or its just not creating the object. I talked to support and they said it wasn't even connecting so I guess it just didn't connect.

Sebastian Maj

unread,
Apr 29, 2016, 7:37:22 PM4/29/16
to back{4}app
Also the ServerURL line is this:
  private string serverURL = "https://parseapi.back4app.com/";

Sebastian Maj

unread,
Apr 30, 2016, 10:32:52 PM4/30/16
to back{4}app
I got a fix, I found a source code fork online and then built it within VS and imported it into unity. Here is the link: https://github.com/supersolid/Parse-SDK-dotNET/tree/release/1.7.0 When you open the .sln change it to release and mixed platform, then build it and import it into your unity project.

Davi Macêdo

unread,
May 1, 2016, 8:56:06 PM5/1/16
to back{4}app
Very good Sebastian. Thank you for sharing to the community. I am sure it will help a lot of people.

threeg...@gmail.com

unread,
May 17, 2016, 9:41:37 AM5/17/16
to back{4}app
I have the exact same issue:
- No errors reported or exceptions generated
- No connection made

I followed the link from Sebastian Maj below but that hasn't changed any behaviour and I still can't connect.

Did anyone else find a way to solve this please?

Sebastian Maj

unread,
May 17, 2016, 9:56:55 AM5/17/16
to back{4}app
So you built it the way I said above? Then you replaced it with the parse files you currently have. Then you use parse initializer behaviour script the default once and it should have an option for server url now. It works perfectly find with that. Let me know if you have any other issues with that.

threeg...@gmail.com

unread,
May 17, 2016, 10:47:34 AM5/17/16
to back{4}app
Thanks for your response Sebastian.
Tried again just to be sure and you are quite right, this has solved it!
Many thanks, not sure what went wrong first time, am so pleased it is working now though!

Sebastian Maj

unread,
May 17, 2016, 11:02:54 AM5/17/16
to back{4}app
No worries, glad I could help! :)

sami...@tkxel.com

unread,
Jun 24, 2016, 3:59:37 AM6/24/16
to back{4}app
Thanks for the help Sebastian, I was having the same issue but your solution helped. Moreover I am attaching a dll file for unity. Just import this file in your unity project and you will be good to go. Download parse.unity.dll

Davi Macêdo

unread,
Jun 24, 2016, 9:54:42 PM6/24/16
to back{4}app
Thank you so much for the contribution Sami!

ivo....@gmail.com

unread,
Jul 12, 2016, 12:59:04 AM7/12/16
to back{4}app
Hi Sami,

Thank you so much! This saved my life as I couldn't run VS from my Mac. Really, life saver ;)

nit...@digit88.com

unread,
Dec 2, 2016, 8:43:36 AM12/2/16
to back{4}app
Hi sami...Did you use Sebastian fork to create this dll or did you just make change parse's dll? I am getting Il2cpp error on trying to build with the dll file you have put on android. I have set scriptinh backend to IL2cpp.

Davi Macêdo

unread,
Dec 2, 2016, 8:51:57 AM12/2/16
to back{4}app

sami...@tkxel.com

unread,
Dec 5, 2016, 12:53:38 AM12/5/16
to back{4}app
Hello Nit,
I had used Sebastian's source code to build the .dll, and I had set scripting backend to mono2x, and it is building binary for android without any issue.

giress...@gmail.com

unread,
Jan 21, 2017, 4:00:30 AM1/21/17
to back{4}app
hello,i have same problem i am unable to connect to parse with unity.

i dont know if the problem is that i do not have donet key  or other
thank you for helping me

Davi Macêdo

unread,
Jan 21, 2017, 3:16:52 PM1/21/17
to back{4}app
In order to see your dot net key: Sign in Back4App -> click in your app features -> core settings

Best!

george...@gmail.com

unread,
Jan 23, 2017, 10:29:16 AM1/23/17
to back{4}app
Davi, 

See if you can help me:

-Already updated parse dll to latest.
-Already successfuly migrated parse.com app to back4app.com, DB is running and healthy.
-Current production app is working normally trough parse.com server.

-Problem:
While adding the "https://parseapi.back4app.com/ to serverUrl returns and error:

SecurityException: No valid crossdomain policy available to allow access
UnityEngine.WWW.get_text () (at C:/buildslave/unity/build/artifacts/EditorGenerated/Utils.cs:172)

I'm still using Unity4 as it is an old project still in production and I can't upgrade it right now.

Thanks for attention. 

george...@gmail.com

unread,
Jan 23, 2017, 10:31:24 AM1/23/17
to back{4}app
And obviouslly I have the crossdomain.xml on my server, since I had this app working with parse.com.

It follows:

<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="georgerigato.com.br"/>
<allow-access-from domain="collabagora.com.br"/>
<allow-access-from domain="skoregame.com.br"/>
<allow-access-from domain="*.back4app.com"/>
<allow-access-from domain="*.parse.com"/>

</cross-domain-policy>

george...@gmail.com

unread,
Jan 23, 2017, 11:34:14 AM1/23/17
to back{4}app

Investigating, it seems my updated client can't find a crossdomain.xml on parseap.back4app.com server as this screenshot shows (right-low corner)


casag...@back4app.com

unread,
Jan 23, 2017, 11:51:34 AM1/23/17
to back{4}app
Hello!

It seems that Unity version does not have support with the latest version of Parse Unity SDK, so it may be the situation since the URL you've set is https://parseapi.back4app.com
Probably you'll need to upgrade your unity version in order to see if there are any other problems.

Best!

george...@gmail.com

unread,
Jan 23, 2017, 12:52:53 PM1/23/17
to back{4}app
Hello,

Thanks for your reply.

Upgrading the unity version of my solution seems impossible since i'm using a very specific set of packages (old NGUI for instance).

I'm hoping for a workaround for this. Any Ideas?

Best regards!

george...@gmail.com

unread,
Jan 24, 2017, 10:15:06 AM1/24/17
to back{4}app
Analyzing the api.parse.com that is still online, it has the crossdomain.xml on its root to allow access from unity webplayer, as the attached image shows. It's a simple solution that requires no update or recoding my solution. 

If I really have to upgrade my solution, the time needed to do so is more useful redoing all the application on another technology/architeture.

Folks as back4app.com, any position as if it will be possible to do so?

Best Regards!


Reply all
Reply to author
Forward
0 new messages