Compile Error with PUN

Options
Hello,
I'm in the midst of writing a book about multiplayer games in Unity 3.
One of the book reviewers was trying out the chapter on Photon Unity Networking and encountered the following compiler error on import from the asset store:
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

at (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType (System.Reflection.Module,string,bool,bool)

at System.Reflection.Assembly.GetType (System.String name, Boolean throwOnError, Boolean ignoreCase) [0x00000] in <filename unknown>:0

at System.Reflection.Assembly.GetType (System.String name) [0x00000] in <filename unknown>:0

at Mono.CSharp.RootNamespace.GetTypeInAssembly (System.Reflection.Assembly assembly, System.String name) [0x00000] in <filename unknown>:0

at Mono.CSharp.RootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in <filename unknown>:0

at Mono.CSharp.GlobalRootNamespace.LookupTypeReflection (Mono.CSharp.CompilerContext ctx, System.String name, Location loc, Boolean must_be_unique) [0x00000] in <filename unknown>:0

at Mono.CSharp.Namespace.LookupType (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in <filename unknown>:0

at Mono.CSharp.Namespace.Lookup (Mono.CSharp.CompilerContext ctx, System.String name, Location loc) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.CoreLookupType (Mono.CSharp.CompilerContext ctx, System.String ns_name, System.String name, Kind type_kind, Boolean required) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.InitCoreTypes (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0

at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0

at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0

He is on Unity 3.x, which last I checked was perfectly fine for Photon Unity Networking (otherwise I would not have included it in the book, seeing as the book is about Unity 3).

Comments

  • Tobias
    Options
    We recently updated the main package to be Unity 4, to be able to support Windows 8 Store and Phone and other, recent platforms.
    For us it was a tough decision if we should stick with 3 or switch to 4. I just tried it and so far, only two developers were unhappy with the switch.
    Why do you target Unity 3 specifically?

    Maybe the problem is due to the extra dll copies in assets\plugins\<platform>.
    If you delete those before you copy PUN to a 3.5 project, you might be fine.
  • That's very unfortunate. Would it be possible to have some kind of branch for supporting Unity 3.x, perhaps a "legacy version" downloadable from the web site?
  • Tobias
    Options
    Couldn't you get it to run?

    We probably release the next version with 3.5.x again and add a package inside to support win8 on demand.
    Something like that.
  • I was able to get it running in 3.5.4f1, the book reviewer was not and eventually settled for using Unity 4 for that chapter.
  • Tobias
    Options
    We will most likely do the next update with 3.5 again and take some extra steps to enable Win 8 Store and Phone on demand in Unity 4.
    Not guaranteed but that's the plan currently.

    Hope you didn't have too much trouble with this.
    If you want our feedback, feel free to send the section to us: developer@exitgames.com and we try to take a look.