Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Third Party Photon plugin has problem with Unity 5

Discussion in 'Multiplayer' started by namlunoy, Mar 5, 2015.

  1. namlunoy

    namlunoy

    Joined:
    Apr 15, 2014
    Posts:
    32
    I have installed Unity 5 and add PUN+ plugin to it!
    It work normal with Android and the standalone!

    But when I switch to Windows phone 8, i have some issues:
    - First of All : I built it as normal and i got this error:
    Plugin 'Photon3Unity3D.dll' is used from several locations:
    Assets/Plugins/Photon3Unity3D.dll would be copied to <PluginPath>/Photon3Unity3D.dll
    Assets/Plugins/WP8/Photon3Unity3D.dll would be copied to <PluginPath>/Photon3Unity3D.dll
    Please fix plugin settings and try again.


    - So I uncheck Any Platform at Assets/Plugins/Photon3Unity3D.dll and i got these errors
    Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs(18,54): error CS0246: The type or namespace name `IPhotonPeerListener' could not be found. Are you missing a using directive or an assembly reference?
    Assets/Photon Unity Networking/Plugins/PhotonNetwork/PingCloudRegions.cs(17,31): error CS0246: The type or namespace name `PhotonPing' could not be found. Are you missing a using directive or an assembly reference?
    Assets/Photon Unity Networking/Plugins/PhotonNetwork/SocketUdp.cs(22,32): error CS0246: The type or namespace name `IPhotonSocket' could not be found. Are you missing a using directive or an assembly reference?
    Assets/Photon Unity Networking/Plugins/PhotonNetwork/LoadbalancingPeer.cs(12,31): error CS0234: The type or namespace name `Lite' does not exist in the namespace `ExitGames.Client.Photon'. Are you missing an assembly reference?
    ....

    - Continue: I uncheck WP8 in Assets/Plugins/WP8/Photon3Unity3D.dll and check WP8 at Assets/Plugins/Photon3Unity3D.dll
    => It run and has no error, but when it run, it stop at PeerCreated state! :(

    Please help me!
     
    Last edited: Mar 5, 2015
  2. cloverbyte

    cloverbyte

    Joined:
    Mar 3, 2015
    Posts:
    1
    I too am having a problem, but with iOS. It wont connect at all.
     
  3. XenoBits

    XenoBits

    Joined:
    Aug 28, 2014
    Posts:
    27
    Hello,

    I've encountered the same issue but I think I've found a solution:
    • Open the properties of Assets/Plugins/Photon3Unity3D.dll
    • Uncheck "Any platform" and check all platforms individually except WP8
    • Open the properties of Assets/Plugins/WP8/Photon3Unity3D.dll
    • Ensure only WP8 platform is selected
    • Then set a Placeholder (in platform settings) as Assets/Plugins/Photon3Unity3D.dll
    Hope this helps
     
    CTPEJIOK22 and Ziaxp like this.
  4. AMNOD

    AMNOD

    Joined:
    Oct 19, 2014
    Posts:
    13
    Hey,

    It's something concerned with building plugins for WP8 and WSA "Windows Store App", you'll need to:
    1- check only the editor in the plugin inspector for the dummy dll in your /plugins folder
    2- check only WP8 "for example" in the plugin inspector for the finally copied dll in your /Plugins/WP8
    3- Set the Placeholder of the later to the dummy dll

    it worked for me.

    check this link for more info:
    http://docs.unity3d.com/Manual/windowsstore-plugins.html
     
    LeeDenbigh likes this.
  5. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    We updated both packages: PUN Free and PUN+. The new version includes a few fixes for Unity 5 but if you still run into trouble, please post again.
    To export to iOS, use Unity 5 patch 1 or Unity 4.6.3p2.
     
  6. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,942
    I import the latest PUN+ package from the Asset Store into Unity 5 and I get the following error :
    My project cannot access any of Photon if I ignore this.

     
  7. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    The file is in the package (definitely). It should get imported, too (by all means).
    Can you find it in the project if you import into a clean, empty project? You could copy it over to your game then.
    The .dll is for all platforms, except iOS and Android. In U5, you need to set the export settings per dll and library.
     
  8. Ziaxp

    Ziaxp

    Joined:
    Nov 25, 2014
    Posts:
    4

    Hay! man, awesome answer ... thanks dude, It worked for me, I am using Prime31 dlls, but having same procedures.
    good man, keep it up.
     
    tobiass likes this.
  9. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    @Ziaxp: Meanwhile, we submit PUN with 2 slightly different packages to the store. One in Unity 4 and one in Unity 5 with the (hopefully) correct dll settings. So you just need to check if something is wrong :)
     
  10. mattparkins

    mattparkins

    Joined:
    Apr 1, 2014
    Posts:
    31
    I'm getting an issue with the latest photon from the asset store:

    Assets/Libraries/Photon Unity Networking/Editor/PhotonNetwork/PhotonViewInspector.cs(14,7): error CS0246: The type or namespace name `Rotorz' could not be found. Are you missing a using directive or an assembly reference?
     
  11. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi I bought Photon+ and I am trying to build for Windows Phone 8.1 and I have Unity 5.3.0f4.

    Game works on the editor but when I try to build it I get this error:

    Code (csharp):
    1. Plugin 'Photon3Unity3D.dll' is used from several locations:
    2. Assets/Plugins/Photon3Unity3D.dll would be copied to <PluginPath>/Photon3Unity3D.dll
    3. Assets/Plugins/Metro/Photon3Unity3D.dll would be copied to <PluginPath>/Photon3Unity3D.dll
    4. Please fix plugin settings and try again.
    5.  
    6. UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
    7. UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
    8. UnityEditor.HostView:OnGUI
    I tried to follow some instructions here like:

    'Uncheck "Any platform" and check all platforms individually except WP8'

    But when I unceck "Any platform" I dont see WP8. Only Editor, Standalone, WebPlayer, WebPlayerStreamed, Android and WSAPlayer.

    I am totally stuck now. What can I do?
     
  12. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    We use an internal API to get reorderable lists in the Editor.
    I can only mean that Unity is removing that API from the Editor. Or it's an issue when loading the source and it goes away?

    Which version of Unity are you using?
     
  13. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    @Nadan: Windows Phone 8.0 dropped out of Unity 5.3. I think that means you have to build WSAPlayer for 8.1 Phone, too.

    I couldn't verify this yet but due to this you likely have to remove one .dll file from PUN in Unity 5.3. Find the folder "WP8" and delete it. Or set the .dll file inside to not build at all.
    Then you should no longer get the error "Plugin 'Photon3Unity3D.dll' is used from several locations".
     
  14. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    I deleted the WP8 folder but still get this error when I try to build:

    Code (csharp):
    1. Plugin 'Photon3Unity3D.dll' is used from several locations:
    2. Assets/Plugins/Photon3Unity3D.dll would be copied to <PluginPath>/Photon3Unity3D.dll
    3. Assets/Plugins/Metro/Photon3Unity3D.dll would be copied to <PluginPath>/Photon3Unity3D.dll
    4. Please fix plugin settings and try again.
    5.  
    6. UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
    7. UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
    8. UnityEditor.HostView:OnGUI
    When I search for Photon3Unity3D.dll (and as the error states) it seems it is still in two places.

    Plugins/Photon3Unity3D
    Plugins/Metro/Photon3Unity3D

    I quess I still need to delete the other one?


    Im not sure how to do this.
     
    Last edited: Dec 12, 2015
  15. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    I removed the Plugins/Metro folder and get no error building.

    Now when I play the game with Visual Studio on my device I get this new error:

    Code (csharp):
    1. System.MissingMethodException was unhandled
    2. Message: An unhandled exception of type 'System.MissingMethodException' occurred in mscorlib.ni.dll
    3. Additional information: Method not found: 'System.Net.Sockets.AddressFamily System.Net.IPAddress.get_AddressFamily()'.
     
  16. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    We will take a look and find a solution asap.
     
    Nadan likes this.
  17. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    I was able to build PUN in Unity 5.3 for Windows Phone 8.1 but maybe some meta information for the dll-exporting got lost in your case.

    Please follow the steps described here, to setup each .dll file's export settings:
    http://forum.photonengine.com/discussion/6427/unity-export-to-windows-8-1-and-universal

    The library in the "WP8" folder is no longer used at all by Unity 5.3. Uncheck all export options for it.
    For me, Unity 5.3 did that automatically.

    With that, you should be able to build.
    The IL2CPP backend might give you extra trouble but I think you're not yet using it.

    And make sure that you set the Capabilities for the player in the Player Settings. PUN requires you to set "Internet Client" at least. There is sadly no way to do this for you automatically.
     
  18. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi!

    I have set the Capabilities to "Internet Client" in the Player Settings, do I need to check more options there or is that enough?

    Anyway I tried to follow the instructions you provided. From the beginning you wrote...

    "For the export to Windows 8.1, you might have to setup the export rules for some assemblies (.dll files) in Unity 5.

    Please try this setup:

    \Plugins\WP8\Photon3Unity3D.dll
    -> Check only WP8Player under platform (any CPU). Add a "Placeholder": \Plugins\Photon3Unity3D.dll. Leave "Don't process" off (as last resort, you could try to check that)."


    It reads "Check only WP8Player under platform". Here is what I see. I select the Photon3Unity3D.dll file but in the right I don't see any "WP8Player"? Am I in wrong place or is something missing from my project? It looks the same with all of the Photon3Unity3D.dll files in the project. No WP8Player to select.

     
  19. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    I edited my reply above (yesterday) because WP8 is no longer used by Unity 5.3.

    As you noticed, you can't select that export anymore in 5.3. It's not using the dll in the "Plugins\Metro" folder only. If you have that folder (with our dll inside), that's also usable for Windows Phone 8.1.

    Hope that helps.
     
  20. quickone

    quickone

    Joined:
    Apr 7, 2015
    Posts:
    1
    I am very new to Photon and keep getting an error Illeagal view ID: 0 method: CreateBurnEffect GO: SFire_Effect. I know you are not supposed to have a view ID 0 but not sure how to fix it. Any ideas?
     

    Attached Files:

  21. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,086
    @quickone: I suggest you do the Marco Polo Tutorial. Code it, don't just read it. That should explain what you should do and how things work.
    If you want to make sure someone sees your question, post in the most fitting topic or create a new thread.