playMaker

Author Topic: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?[SOLVED]  (Read 10235 times)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
I have purchased the Android upgrade for Unity, but not the Pro version, as I do not need the pro features for Android.

I cannot compile to the phone, apparently because Playmaker has references to 'Photon3Unity3D' - even when the game has zero Photon networking contents.

I get this:

Error building Player: SystemException: 'System.Net.Sockets' are supported only with Unity Android Pro. Referenced from assembly 'Photon3Unity3D'.

Can I somehow remove the cause for this, so it is possible to compile Playmaker games for 'Android poor'?

Thanks
« Last Edit: August 14, 2014, 02:08:55 PM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #1 on: May 23, 2013, 01:05:01 AM »
Hi,

 unfortunatly no, Photon requires sockets, and sockets are only available in mobile pro versions. You can publish for desktop and web fine tho,

bye,

 Jean

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #2 on: May 25, 2013, 02:15:22 PM »
Correction: Fortunately Yes!

It's ugly and often requires a couple of import/delete in the workflow:

1) Make everything work, and "Build & Run" on the Android device
2) Wait for the "you have no right to use Photon" error from Unity
3) Delete the Photon directory from the Playmaker folder
4) "Build & Run" again

All this could be avoided if Photon was optional as an extra download.. and I bet 99,9 out of 100 times "Build & Run" is pressed, the average Playmaker is not using Photon.

It's of course possible to just not import Photon in the first place, but then Playmaker is protesting, and things cannot run.

If at least Playmaker would not _protest_ because Photon is missing, my life would be easier ;) I do not think it did so in previous versions?

And Playmaker would all the sudden be compatible with Unity Pro / Android Poor.

You could just let it be an "Import" functionality from the Photon Addon Drop down in the top menu.

Cheers, keep up the fantastic work!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #3 on: May 25, 2013, 03:43:48 PM »
Photon should be entirely self contained, you should only need to delete the Photon directory. You shouldn't need any other steps.

What errors do you see if you don't import Photon? That should also work.

Maybe you downloaded a photon integration beta that put files in other places...?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #4 on: May 26, 2013, 01:12:22 AM »
Hi,

 Can you detail more about what PlayMaker says when you don't import Photon? I just tried and it works fine: import playmaker package, unselect the folder "Photon Unity Networking" ( double check that all sub folders and files contained in that folder are also unselected automatically), and import, playmaker runs fine.

 I also tried to delete the "Photon Unity Networking" in the asset folder and that's fine too, no error.

Maybe there is a specific repro?

bye,

 Jean

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #5 on: May 26, 2013, 03:22:04 AM »
I tried to provoke the error "clean and nice" for you, but it appears it's only when I am taking a lot of steps.

The error is:
Assets/Photon Unity Networking/PlayMaker/Editor/PlayMakerPhotonWizard.cs(7,38): error CS0246: The type or namespace name `PhotonEditor' could not be found. Are you missing a using directive or an assembly reference?

And I did manage to get it somewhere in the line of going to
http://www.hutonggames.com/tutorials_ios_fundamentals.php
-> Download the tutorial objects used in this series. -> Import / delete / mess about without Photon.

The system should not be asking me for Photon, it's not used.

But I must say that it was not all that easy, and it's very likely that I just thought that the error was "standard", and so got paranoid.

Because if I am not messing that much about, say if I am not deleting an entire project imported and working without Photon, and then import a new playmaker-involving project in to that same project, I am not getting the error.

What I am trying to say is that you cannot predict everything, and that when I am just having faith in Playmaker, most of the times it works very fine if I deselect Photon in the import.

Of course I still think it should not be imported as standard, could be a nice thing to do from the drop down top menu :)

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #6 on: May 30, 2013, 04:14:18 PM »
Hm.. It'd be really nice if Playmaker did not somehow include that Photon thing in a way it somehow often is needed. I keep getting errors in a somewhat normal workflow when I try and live without Photon.

Now I got this error after first opening a file that needs Playmaker, and then installing it without Photon:

Assets/Photon Unity Networking/PlayMaker/Editor/PlayMakerPhotonWizard.cs(7,38): error CS0246: The type or namespace name `PhotonEditor' could not be found. Are you missing a using directive or an assembly reference?

Then I cannot run anything without first installing Photon on top so the error message disappears (Unity is blocking any run attempts before this), and then delete it again :)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #7 on: May 30, 2013, 06:06:07 PM »
Quote
Now I got this error after first opening a file that needs Playmaker, and then installing it without Photon:

What kind of file are you opening? Do you mean a project? Or importing a unitypackage? Can you be more specific?

I'm not sure how you'd get this error without the Photon Unity Networking folder... The Photon integration is entirely inside that folder. Deleting that folder  should remove all references to Photon.

We may move to an Addons menu to install optional addons in the future, but we will still follow this model of a self contained folder, so I want to understand the problem, since it will likely happen however we install that addon folder...

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #8 on: June 05, 2013, 07:39:12 AM »
Hi guys,

I actually got this error too (at least the initial error reported at the start of the thread).   Since my PC is my primary development platform, I use the free version of Unity on my mac when publishing to iOS.  I can't afford two pro licenses.

I tried to build an application for iOS today for the first time in a few weeks, and probably the first time since Proton was integrated (older projects using older PM versions), and got this message from Unity when building:

Error building Player: SystemException: System.Net.Sockets are supported only on Unity iPhone Advanced. Referenced from assembly 'Photon3Unity3D'.

I will try deleting the Photon directory as suggested, but wanted to add my comment to the thread.

EDIT: Yep, worked beautifully.  I guess I'll have to migrate my license to my mac when Im ready to use anything Photon related, but that's better than a showstopper.
« Last Edit: June 05, 2013, 07:44:42 AM by artician »

Khoa1994

  • Playmaker Newbie
  • *
  • Posts: 33
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #9 on: August 03, 2014, 11:28:59 AM »
After deleting the "Photon Unity Networking" folder, I still get the error "Error building Player: SystemException: System.Net.Sockets are supported only on Unity iOS Pro. Referenced from assembly 'Assembly-CSharp'." when I build my game for iOS. Please help me fix this.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #10 on: August 04, 2014, 09:03:09 AM »
Hi,

 Think this is solved right? You looked up System.Net.Sockets and removed the files that whee using this.

 Bye,

 Jean

Khoa1994

  • Playmaker Newbie
  • *
  • Posts: 33
Re: How to compile without 'System.Net.Sockets' / 'Photon3Unity3D' ?
« Reply #11 on: August 12, 2014, 11:09:07 AM »
Yes.