Basic setup issue

edited April 2015 in DotNet
I'm in the process of making a simple multiplayer turn based game.

Some days ago, I landed on the page

I've signed up, downloaded "Unity 3D SDK v4.0.0.4" and am ready to take the load balancing client for a spin, as per the example in the above page:
using ExitGames.Client.Photon.LoadBalancing;
public class MyClient
    private LoadBalancingClient client;
    // this is called when the client loaded and is ready to start   
    void Start()
        client = new LoadBalancingClient();
        client.AppId = "<your appid>";  // edit this!
        // "eu" is the European region's token
        bool connectInProcess = client.ConnectToRegionMaster("eu");  // can return false for errors
    // ...

In the file "<Unity3D SDK root>/readme.txt", I've been asked to "Copy the Photon .dll into the "Assets\Plugins" folder of your project. Avoid dll duplicates!". Somewhere here in the forums, I read that I probably should copy the entire release folder if I'd like to build for WP8 as well. Thus, my Unity assets now contains "/Plugins/Photon3Unity3D.dll" (and "/Plugins/Plugins/Metro" and "/Plugins/Plugins/WP8" and files specific to the Metro/WP8 builds). My Unity target is set to "PC, Mac & Linux standalone".

I can successfully reference the "ExitGames.Client.Photon" namespace. However, MonoDevelop claims that "LoadBalancing" is not defined in the "ExitGames.Client.Photon", so the example I'm trying to follow isn't matching what I see. As long as I can't find the namespace "LoadBalancing", it's no surprise that I can't use objects of the type LoadBalancingClient either.

How can I get the namespace ExitGames.Client.Photon.LoadBalancing and/or LoadBalancingClient referenced from my code?

Thanks! :)


  • So I think I figured it out. In the SDK folder, there's a demo-turnbased-sandbox project with an Asset folder in it. In there, I found the LoadbalancingApi script folder. Once imported into my working Unity project, it seems to build fine. :)

    ExitGames: a small addition to the readme.txt would probably save the next person some time setting this up.
  • Sorry for the hassle. We basically expected everyone to start from the demo. Will add a section about that.
  • No problem! And by the way: thanks for a great service!
Sign In or Register to comment.