diff --git a/.nuget/Client_ReadMe.txt b/.nuget/Client_ReadMe.txt new file mode 100644 index 0000000..f1e32b2 --- /dev/null +++ b/.nuget/Client_ReadMe.txt @@ -0,0 +1,5 @@ +Download [Photon Server SDK] https://www.photonengine.com/en-US/OnPremise/Download +Add and reference following dlls. + +lib/ExitGamesLibs.dll +lib/Photon3DotNet.dll \ No newline at end of file diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config new file mode 100644 index 0000000..67f8ea0 --- /dev/null +++ b/.nuget/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe new file mode 100644 index 0000000..3ffdd33 Binary files /dev/null and b/.nuget/NuGet.exe differ diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets new file mode 100644 index 0000000..f943812 --- /dev/null +++ b/.nuget/NuGet.targets @@ -0,0 +1,144 @@ + + + + $(MSBuildProjectDirectory)\..\ + + + false + + + false + + + true + + + false + + + + + + + + + + + $([System.IO.Path]::Combine($(SolutionDir), ".nuget")) + + + + + $(SolutionDir).nuget + + + + $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config + $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config + + + + $(MSBuildProjectDirectory)\packages.config + $(PackagesProjectConfig) + + + + + $(NuGetToolsPath)\NuGet.exe + @(PackageSource) + + "$(NuGetExePath)" + mono --runtime=v4.0.30319 $(NuGetExePath) + + $(TargetDir.Trim('\\')) + + -RequireConsent + -NonInteractive + + "$(SolutionDir) " + "$(SolutionDir)" + + + $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir) + $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols + + + + RestorePackages; + $(BuildDependsOn); + + + + + $(BuildDependsOn); + BuildPackage; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.nuget/PhotonWire.Client.nuspec b/.nuget/PhotonWire.Client.nuspec new file mode 100644 index 0000000..05eacdc --- /dev/null +++ b/.nuget/PhotonWire.Client.nuspec @@ -0,0 +1,32 @@ + + + + PhotonWire.Client + 1.0.2 + PhotonWire.Client + neuecc + neuecc + false + Typed Asynchronous RPC Layer for Photon Server. This package is for .NET client implementation. + + + + en-US + http://opensource.org/licenses/MIT + https://github.com/neuecc/PhotonWire + Photon MultiPlayer Distributed websockets streaming realtime unity + + + + + + + + + + + + + \ No newline at end of file diff --git a/.nuget/PhotonWire.Server.nuspec b/.nuget/PhotonWire.Server.nuspec new file mode 100644 index 0000000..7978873 --- /dev/null +++ b/.nuget/PhotonWire.Server.nuspec @@ -0,0 +1,31 @@ + + + + PhotonWire.Server + 1.0.2 + PhotonWire.Server + neuecc + neuecc + false + Typed Asynchronous RPC Layer for Photon Server. This package is for realtime server implementation. + + + + en-US + http://opensource.org/licenses/MIT + https://github.com/neuecc/PhotonWire + Photon MultiPlayer Distributed websockets streaming realtime unity + + + + + + + + + + + + \ No newline at end of file diff --git a/.nuget/PhotonWire.nuspec b/.nuget/PhotonWire.nuspec new file mode 100644 index 0000000..25c2378 --- /dev/null +++ b/.nuget/PhotonWire.nuspec @@ -0,0 +1,28 @@ + + + + PhotonWire + 1.0.2 + PhotonWire + neuecc + neuecc + false + Typed Asynchronous RPC Layer for Photon Server. This package includes Server libs + Analyzer + HubInvoker + + + + en-US + http://opensource.org/licenses/MIT + https://github.com/neuecc/PhotonWire + Photon MultiPlayer Distributed websockets streaming realtime unity + + + + + + + + + \ No newline at end of file diff --git a/.nuget/Server_ReadMe.txt b/.nuget/Server_ReadMe.txt new file mode 100644 index 0000000..e19ea38 --- /dev/null +++ b/.nuget/Server_ReadMe.txt @@ -0,0 +1,102 @@ +Package does not includes Photon SDK, +please download from [Photon Server SDK] +https://www.photonengine.com/en-US/OnPremise/Download +Add and reference following dlls. + +lib/ExitGamesLibs.dll +lib/Photon.SocketServer.dll +lib/PhotonHostRuntimeInterfaces.dll + +And PhotonSocketServer.exe binary copy to $(SolutionDir)\PhotonLibs\bin_Win64 + +PhotonWire.HubInvoker is in packages\PhotonWire\tools\ + +--- + +1. Create Startup.cs + +``` +using PhotonWire.Server; + +public class Startup : PhotonWireApplicationBase +{ + +} +``` + +2. Create Hub + +```csharp +using PhotonWire.Server; + +[Hub(0)] +public class MyFirstHub : Hub +{ + [Operation(0)] + public int Sum(int x, int y) + { + return x + y; + } +} +``` + +3. Create PhotonServer.config (must be UTF-8 without BOM) + +```xml + + + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + +``` + +4. Setup VisualStudio debugging option + +// Start external program: +/* Absolute Dir Paths */\PhotonLibs\bin_Win64\PhotonSocketServer.exe + +// Star Options, Command line arguments: +/debug GettingStarted /config GettingStarted.Server\bin\PhotonServer.config + +// Star Options, Working directory: +/* Absolute Path */\PhotonLibs\ \ No newline at end of file diff --git a/.nuget/pack.bat b/.nuget/pack.bat new file mode 100644 index 0000000..895206f --- /dev/null +++ b/.nuget/pack.bat @@ -0,0 +1,3 @@ +nuget pack PhotonWire.nuspec +nuget pack PhotonWire.Server.nuspec +nuget pack PhotonWire.Client.nuspec \ No newline at end of file diff --git a/.nuget/push.bat b/.nuget/push.bat new file mode 100644 index 0000000..5e635e4 --- /dev/null +++ b/.nuget/push.bat @@ -0,0 +1,4 @@ +nuget push PhotonWire.1.0.2.nupkg +nuget push PhotonWire.Server.1.0.2.nupkg +nuget push PhotonWire.Client.1.0.2.nupkg +nuget push ..\Source\PhotonWire.Analyzer\bin\Release\PhotonWire.Analyzer.1.0.2.0.nupkg \ No newline at end of file diff --git a/PhotonWire.sln b/PhotonWire.sln index 9d93253..7abe934 100644 --- a/PhotonWire.sln +++ b/PhotonWire.sln @@ -4,9 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{7341F80B-AC69-42CA-BBDC-3BD667C7C640}" - ProjectSection(SolutionItems) = preProject - VSDocToMarkdown.csx = VSDocToMarkdown.csx - EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{8C25F347-E802-4BFF-BBA7-5EFA3E8CB03A}" EndProject @@ -36,8 +33,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotonWire.UnityClient.CSha EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F69EC9CD-AD54-4725-BF65-40C2D488E465}" ProjectSection(SolutionItems) = preProject + .nuget\Client_ReadMe.txt = .nuget\Client_ReadMe.txt + .nuget\pack.bat = .nuget\pack.bat + .nuget\PhotonWire.Client.nuspec = .nuget\PhotonWire.Client.nuspec + .nuget\PhotonWire.nuspec = .nuget\PhotonWire.nuspec + .nuget\PhotonWire.Server.nuspec = .nuget\PhotonWire.Server.nuspec + .nuget\push.bat = .nuget\push.bat README.md = README.md - VSDocToMarkdown.csx = VSDocToMarkdown.csx + .nuget\Server_ReadMe.txt = .nuget\Server_ReadMe.txt EndProjectSection EndProject Global diff --git a/README.md b/README.md index ef53189..a355c51 100644 --- a/README.md +++ b/README.md @@ -2,50 +2,765 @@ PhotonWire === Typed Asynchronous RPC Layer for Photon Server + Unity -Document +What is PhotonWire? --- -Coming Soon... +PhotonWire provides client-server RPC with Photon Unity Native SDK and and server-server RPC with Photon Server SDK. PhotonWire mainly aims to fully controll server side logic. -Download from Photon Server SDK -https://www.photonengine.com/en-US/OnPremise/Download +* TypeSafe, Server-Server uses dynamic proxy, Client-Server uses T4 pre-generate +* HighPerformance, Fully Asynchronous(Server is async/await, Client is UniRx) and pre-generated serializer by [MsgPack](http://msgpack.org/) +* Fully integrated with Visual Studio +* Tools, PhotonWire.HubInvoker can invoke API directly -under deloy/bin_Win64 +Getting Started - Server +--- +In Visual Studio(2015 or higher), create new .NET 4.6(or higher) `Class Library Project`. For example sample project name - `GettingStarted.Server`. + +In Package Manager Console, add PhotonWire NuGet package. + +* PM> Install-Package PhotonWire + +It includes `PhotonWire.Server` and `PhotonWire.Analyzer`. + +Package does not includes Photon SDK, please download from [Photon Server SDK](https://www.photonengine.com/en-US/OnPremise/Download). Server Project needs `lib/ExitGamesLibs.dll`, `lib/Photon.SocketServer.dll` and `lib/PhotonHostRuntimeInterfaces.dll`. + +```csharp +using PhotonWire.Server; + +namespace GettingStarted.Server +{ + // Application Entrypoint for Photon Server. + public class Startup : PhotonWireApplicationBase + { + + } +} +``` + +Okay, Let's create API! Add C# class file `MyFirstHub.cs`. + +```csharp +using PhotonWire.Server; -for Server Project -lib/ExitGamesLibs.dll -lib/Photon.SocketServer.dll -lib/PhotonHostRuntimeInterfaces.dll +namespace GettingStarted.Server +{ + [Hub(0)] + public class MyFirstHub : Hub + { + [Operation(0)] + public int Sum(int x, int y) + { + return x + y; + } + } +} +``` -for .NET Clinet Project -lib/ExitGamesLibs.dll -lib/Photon3DotNet.dll +![image](https://cloud.githubusercontent.com/assets/46207/15641589/f703ccb2-267c-11e6-8aa2-9a919bdbbecd.png) -for Unity Project -lib /Photon3Unity3D.dll +Hub Type needs `HubAttribute` and Method needs `OperationAttribute`. `PhotonWire.Analyzer` detects there rules. You may only follow it. +Configuration sample. config file *must be UTF8 without BOM*. -ServerApp Copy dll +```xml + + + + -Build Events -> Post-build event commandline + + + + 8 + + + + + + + + + + + + + + + + + + + + +``` + +And modify property, Copy to Output Directory `Copy always` + +![image](https://cloud.githubusercontent.com/assets/46207/15642096/125b4a1e-2680-11e6-98e5-6d9e0a0353e4.png) + +Here is the result of Project Structure. + +![image](https://cloud.githubusercontent.com/assets/46207/15641797/2fdba392-267e-11e6-8244-0428adbe150a.png) + +Start and Debug Server Codes on Visual Studio +--- +PhotonWire application is hosted by `PhotonSocketServer.exe`. `PhotonSocketServer.exe` is in Photon Server SDK, copy from `deploy/bin_64` to `$(SolutionDir)\PhotonLibs\bin_Win64`. -xcopy "$(TargetDir)*.*" "$(SolutionDir)..\PhotonLibs\$(ProjectName)\bin\" /Y /Q +Open Project Properties -> Build Events, write Post-build event commandline: +``` +xcopy "$(TargetDir)*.*" "$(SolutionDir)\PhotonLibs\$(ProjectName)\bin\" /Y /Q +``` +In Debug tab, set up three definitions. -Debug --> Start external program: +![image](https://cloud.githubusercontent.com/assets/46207/15642631/894128b2-2683-11e6-88b9-69665699fd56.png) + +``` +// Start external program: /* Absolute Dir Paths */\PhotonLibs\bin_Win64\PhotonSocketServer.exe --> Star Options -/debug PhotonWireSample /config PhotonWire.Sample.ServerApp\bin\PhotonServer.config +// Star Options, Command line arguments: +/debug GettingStarted /config GettingStarted.Server\bin\PhotonServer.config --> Working directory: +// Star Options, Working directory: /* Absolute Path */\PhotonLibs\ +``` + +Press `F5` to start debugging. If cannot start debugging, please see log. Log exists under `PhotonLibs\log`. If encounts `Exception: CXMLDocument::LoadFromString()`, please check config file encoding, *must be UTF8 without BOM*. + +Let's try to invoke from test client. `PhotonWire.HubInvoker` is hub api testing tool. It exists at `$(SolutionDir)\packages\PhotonWire.1.0.0\tools\PhotonWire.HubInvoker\PhotonWire.HubInvoker.exe`. + +Configuration, + +ProcessPath | Argument | WorkingDirectory is same as Visual Studio's Debug Tab. +DllPath is `/* Absolute Path */\PhotonLibs\GettingStarted.Server\bin\GettingStarted.Server.dll` + +Press Reload button, you can see like following image. + +![image](https://cloud.githubusercontent.com/assets/46207/15644476/4e16f7ac-268e-11e6-9053-c6d29209ca49.png) + + + +At first, press Connect button to connect target server. And Invoke method, please try x = 100, y = 300 and press Send button. + +In visual studio, if set the breakpoint, you can step debugging and see, modify variables. + +![image](https://cloud.githubusercontent.com/assets/46207/15644597/f39d935c-268e-11e6-970c-67c4e1a48400.png) + +and HubInvoker shows return value at log. + +``` +Connecting : 127.0.0.1:4530 GettingStarted +Connect:True ++ MyFirstHub/Sum:400 +``` +There are basic steps of create server code. + +Getting Started - Unity Client +--- +Download and Import `PhotonWire.UnityClient.unitypackage` from [release page](https://github.com/neuecc/PhotonWire/releases). If encounts `Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.`, Please change Build Settings -> Optimization -> Api Compatibility Level -> .NET 2.0. + +![image](https://cloud.githubusercontent.com/assets/46207/15645273/70dbb1c0-2692-11e6-8716-9076fe3d81a1.png) + +PhotonWire's Unity Client needs additional SDK. + +* Download [Photon Server SDK](https://www.photonengine.com/en-US/OnPremise/Download) and pick `lib/Photon3Unity3D.dll` to `Assets\Plugins\Dll`. +* Import [UniRx](https://github.com/neuecc/UniRx) from asset store. + +Add Unity Generated Projects to Solution. + +![image](https://cloud.githubusercontent.com/assets/46207/15650356/e005cf7a-26b2-11e6-8b08-70569471ce13.png) + +> You can choose Unity generated solution based project or Standard solution based project. Benefit of Unity generated based is better integrated with Unity Editor(You can double click source code!) but solution path becomes strange. + +Search `Assets/Plugins/PhotonWire/PhotonWireProxy.tt` under `GettingStarted.UnityClient.CSharp.Plugins` and configure it, change the dll path and assemblyName. This file is typed client generator of server definition. + +``` +<#@ assembly name="$(SolutionDir)\GettingStarted.Server\bin\Debug\MsgPack.dll" #> +<#@ assembly name="$(SolutionDir)\GettingStarted.Server\bin\Debug\GettingStarted.Server.dll" #> +<# + // 1. ↑Change path to Photon Server Project's DLL and Server MsgPack(not client) DLL + + // 2. Make Configuration ----------------------- + + var namespaceName = "GettingStarted.Client"; // namespace of generated code + var assemblyName = "GettingStarted.Server"; // Photon Server Project's assembly name + var baseHubName = "Hub`1"; // is `1, If you use base hub, change to like FooHub`1. + var useAsyncSuffix = true; // If true FooAsync + + // If WPF, use "DispatcherScheduler.Current" + // If ConsoleApp, use "CurrentThreadScheduler.Instance" + // If Unity, use "Scheduler.MainThread" + var mainthreadSchedulerInstance = "Scheduler.MainThread"; + + // End of Configuration----------------- +``` + +Right click -> Run Custom Tool generates typed client(`PhotonWireProxy.Generated.cs`). + +![image](https://cloud.githubusercontent.com/assets/46207/15650491/ea1dfb44-26b3-11e6-982b-de44be2ab99c.png) + +Setup has been completed! Let's connect PhotonServer. Put uGUI Button to scene and attach following `PhotonButton` script. + +```csharp +using ExitGames.Client.Photon; +using PhotonWire.Client; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace GettingStarted.Client +{ + public class PhotonButton : MonoBehaviour + { + // set from inspector + public Button button; + + ObservablePhotonPeer peer; + MyFirstHubProxy proxy; + + void Start() + { + // Create Photon Connection + peer = new ObservablePhotonPeer(ConnectionProtocol.Tcp, peerName: "PhotonTest"); + + // Create typed server rpc proxy + proxy = peer.CreateTypedHub(); + + // Async Connect(return IObservable) + peer.ConnectAsync("127.0.0.1:4530", "GettingStarted.Server") + .Subscribe(x => + { + UnityEngine.Debug.Log("IsConnected?" + x); + }); + + + button.OnClickAsObservable().Subscribe(_ => + { + + // Invoke.Method calls server method and receive result. + proxy.Invoke.SumAsync(100, 300) + .Subscribe(x => Debug.Log("Server Return:" + x)); + + }); + } + + void OnDestroy() + { + // disconnect peer. + peer.Dispose(); + } + } + +} +``` + +and press button, you can see `Server Return:400`. + +If shows Windows -> PhotonWire, you can see connection stae and graph of sent, received bytes. + +![image](https://cloud.githubusercontent.com/assets/46207/15650771/fbdf81d4-26b5-11e6-87d0-811e1e77ca8f.png) + +Debugging both Server and Unity, I recommend use [SwitchStartupProject](https://visualstudiogallery.msdn.microsoft.com/f4e1be8c-b2dd-4dec-b273-dd88f8818571) extension. + +Create Photon + Unity multi startup. + +![image](https://cloud.githubusercontent.com/assets/46207/15650843/6a69a288-26b6-11e6-9aa6-ca520e47afd3.png) + +And debug it, top is server, bottom is unity. + +![bothdebug](https://cloud.githubusercontent.com/assets/46207/15651046/f0931f46-26b7-11e6-979c-b8a766511617.gif) + +Getting Started - .NET Client +--- +.NET Client can use ASP.NET, ConsoleApplication, WPF, etc. + +* PM> Install-Package PhotonWire +* Download [Photon Server SDK](https://www.photonengine.com/en-US/OnPremise/Download) and pick `lib/ExitGamesLibs.dll` and `lib/Photon3DotNet.dll`. + +Getting Started - Sharing Classes +--- +PhotonWire supports complex type serialize by MsgPack. At first, share request/response type both server and client. + +Create .NET 3.5 Class Library Project - `GettingStarted.Share` and add the Person.cs. + +```csharp +namespace GettingStarted.Share +{ + public class Person + { + public int Age { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + } +} +``` + +Open project property window, Build Events -> Post-build event command line, add the following copy dll code. +``` +xcopy "$(TargetDir)*.*" "$(SolutionDir)\GettingStarted.UnityClient\Assets\Plugins\Dll\" /Y /Q +``` + +Move to `GettingStareted.Server`, reference project `GettingStarted.Share` and add new method in MyFirstHub. -PhotonServer.config -> Copyt to Output Directory, Copy always +```csharp +[Operation(1)] +public Person CreatePerson(int seed) +{ + var rand = new Random(seed); + return new Person + { + FirstName = "Yoshifumi", + LastName = "Kawai", + Age = rand.Next(0, 100) + }; +} +``` -Encount -`Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.` -Build Settings -> Optimization Api Compatibility Level -> .NET 2.0 +Maybe you encount error message, response type must be DataContract. You can modify quick fix. +![image](https://cloud.githubusercontent.com/assets/46207/15651560/63aa7490-26bb-11e6-8b87-11f909eba119.png) + +And add the reference `System.Runtime.Serialization` to `GettingStarted.Share`. + +Build `GettingStarted.Server`, and Run Custom Tool of `PhotonWireProxy.tt`. + +```csharp +// Unity Button Click +proxy.Invoke.CreatePersonAsync(Random.Range(0, 100)) + .Subscribe(x => + { + UnityEngine.Debug.Log(x.FirstName + " " + x.LastName + " Age:" + x.Age); + }); +``` + +Response deserialization is multi threaded and finally return to main thread by UniRx so deserialization does not affect performance. Furthermore deserializer is used pre-generated optimized serializer. + +```csharp +[System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")] +[System.Diagnostics.DebuggerNonUserCodeAttribute()] +public class GettingStarted_Share_PersonSerializer : MsgPack.Serialization.MessagePackSerializer { + + private MsgPack.Serialization.MessagePackSerializer _serializer0; + + private MsgPack.Serialization.MessagePackSerializer _serializer1; + + public GettingStarted_Share_PersonSerializer(MsgPack.Serialization.SerializationContext context) : + base(context) { + MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema); + schema0 = null; + this._serializer0 = context.GetSerializer(schema0); + MsgPack.Serialization.PolymorphismSchema schema1 = default(MsgPack.Serialization.PolymorphismSchema); + schema1 = null; + this._serializer1 = context.GetSerializer(schema1); + } + + protected override void PackToCore(MsgPack.Packer packer, GettingStarted.Share.Person objectTree) { + packer.PackArrayHeader(3); + this._serializer0.PackTo(packer, objectTree.Age); + this._serializer1.PackTo(packer, objectTree.FirstName); + this._serializer1.PackTo(packer, objectTree.LastName); + } + + protected override GettingStarted.Share.Person UnpackFromCore(MsgPack.Unpacker unpacker) { + GettingStarted.Share.Person result = default(GettingStarted.Share.Person); + result = new GettingStarted.Share.Person(); + + int unpacked = default(int); + int itemsCount = default(int); + itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); + System.Nullable nullable = default(System.Nullable); + if ((unpacked < itemsCount)) { + nullable = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(GettingStarted.Share.Person), "Int32 Age"); + } + if (nullable.HasValue) { + result.Age = nullable.Value; + } + unpacked = (unpacked + 1); + string nullable0 = default(string); + if ((unpacked < itemsCount)) { + nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(GettingStarted.Share.Person), "System.String FirstName"); + } + if (((nullable0 == null) + == false)) { + result.FirstName = nullable0; + } + unpacked = (unpacked + 1); + string nullable1 = default(string); + if ((unpacked < itemsCount)) { + nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(GettingStarted.Share.Person), "System.String LastName"); + } + if (((nullable1 == null) + == false)) { + result.LastName = nullable1; + } + unpacked = (unpacked + 1); + + return result; + } +} +``` + +Startup Configuration +--- +Override the Startup methods, you can configure options. + +```csharp +public class Startup : PhotonWireApplicationBase +{ + // When throw exception, returns exception information. + public override bool IsDebugMode + { + get + { + return true; + } + } + + // connected peer is server to server? + protected override bool IsServerToServerPeer(InitRequest initRequest) + { + return (initRequest.ApplicationId == "MyMaster"); + } + + // initialize, if needs server to server connection, write here. + protected override void SetupCore() + { + var _ = ConnectToOutboundServerAsync(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 4530), "MyMaster"); + } + + // tear down + protected override void TearDownCore() + { + base.TearDownCore(); + } +} +``` + +More options, see [reference](https://github.com/neuecc/PhotonWire/wiki). + +Hub +--- +Hub concept is highly inspired by [ASP.NET SignalR](http://www.asp.net/signalr/overview/getting-started) so SignalR's document is maybe useful. + +Hub supported typed client broadcast. + +```csharp +// define client interface. +public interface ITutorialClient +{ + [Operation(0)] + void GroupBroadcastMessage(string message); +} + +// Hub +[Hub(100)] +public class Tutorial : PhotonWire.Server.Hub +{ + [Operation(2)] + public void BroadcastAll(string message) + { + // Get ClientProxy from Clients property, choose target and Invoke. + this.Clients.All.GroupBroadcastMessage(message); + } +} +``` + +Hub have two instance property, [OperationContext](https://github.com/neuecc/PhotonWire/wiki/PhotonWire.Server#operationcontext) and [Clients](https://github.com/neuecc/PhotonWire/wiki/PhotonWire.Server#hubcallerclientproxyt). OperationContext is information per operation. It has `Items` - per operation storage(`IDictionary`), `Peer` - client connection of this operation, and more. + +Peer.RegisterDisconnectAction is sometimes important. + +```csharp +this.Context.Peer.RegisterDisconnectAction((reasonCode, readonDetail) => +{ + // do when disconnected. +}); +``` + +Clients is proxy of broadcaster. `All` is broadcast to all server, `Target` is only send to target peer, and more. + +`Group` is multipurpose channel. You can add/remove per peer `Peer.AddGroup/RemoveGroup`. And can use from Clients. + + +```csharp +[Operation(3)] +public void RegisterGroup(string groupName) +{ + // Group is registered by per connection(peer) + this.Context.Peer.AddGroup(groupName); +} + +[Operation(4)] +public void BroadcastTo(string groupName, string message) +{ + // Get ITutorialClient -> Invoke method + this.Clients.Group(groupName).GroupBroadcastMessage(message); +} +``` + +Operation response supports async/await. + +```csharp +[Operation(1)] +public async Task GetHtml(string url) +{ + var httpClient = new HttpClient(); + var result = await httpClient.GetStringAsync(url); + + // Photon's String deserialize size limitation + var cut = result.Substring(0, Math.Min(result.Length, short.MaxValue - 5000)); + + return cut; +} +``` + +Server to Server +--- +PhotonWire supports Server to Server. Server to Server connection also use Hub system. PhotonWire provides three hubs. + +* ClientPeer - Hub +* OutboundS2SPeer - ServerHub +* InboundS2SPeer - ReceiveServerHub + +Implements ServerHub. + +```csharp +// 1. Inherit ServerHub +// 2. Add HubAttribute +[Hub(54)] +public class MasterTutorial : PhotonWire.Server.ServerToServer.ServerHub +{ + // 3. Create virtual, async method + // 4. Add OperationAttribute + [Operation(0)] + public virtual async Task Multiply(int x, int y) + { + return x * y; + } +} +``` + +Call from Hub. + +```csharp +[Operation(5)] +public async Task ServerToServer(int x, int y) +{ + var mul = await GetServerHubProxy().Single.Multiply(x, y); + + // If is not in Hub, You can get ClientProxy from global PeerManager + // PeerManager.GetServerHubContext().Clients.Single.Multiply(x, y); + + return mul; +} +``` + +GetServerHubProxy is magic by dynamic proxy. + +![image](https://cloud.githubusercontent.com/assets/46207/15653376/a7139f5c-26c7-11e6-98ff-25bb77612378.png) + +ReceiveServerHub is similar with ServerHub. + +```csharp +[Hub(10)] +public class BroadcasterReceiveServerHub : ReceiveServerHub +{ + [Operation(20)] + public virtual async Task Broadcast(string group, string msg) + { + // Send to clients. + this.GetClientsProxy() + .Group(group) + .GroupBroadcastMessage(msg); + } +} +``` + +Call from ServerHub. + +```csharp +[Operation(1)] +public virtual async Task Broadcast(string group, string message) +{ + // Invoke all receive server hubs + await GetReceiveServerHubProxy() + .All.Invoke(x => x.Broadcast(group, message)); +} +``` + +Client Receiver. + +```csharp +// receive per operation +proxy.Receive.GroupBroadcastMessage.Subscribe(); + +// or receive per client +proxy.RegisterListener(/* TutorialProxy.ITutorialClient */); +``` + +![image](https://cloud.githubusercontent.com/assets/46207/15654009/a1f6ac54-26cb-11e6-8dec-893b7624d476.png) + + +Server Cluster +--- +Server to Server connection is setup in Startup. That's all. + +```csharp +public class Startup : PhotonWireApplicationBase +{ + protected override bool IsServerToServerPeer(InitRequest initRequest) + { + return (initRequest.ApplicationId == "MyMaster"); + } + + protected override void SetupCore() + { + var _ = ConnectToOutboundServerAsync(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 4530), "MyMaster"); + } +} +``` + +You can choice own cluster type. + +![image](https://cloud.githubusercontent.com/assets/46207/15654243/7d2847aa-26cd-11e6-95cc-4f77c441f213.png) + +PhotonWire supports everything. + +Configuration +--- +PhotonWire supports app.config. Here is sample config + +```xml + + +
+ + + + + + + + + + +``` + +```csharp +public class GameServerStartup : PhotonWire.Server.PhotonWireApplicationBase +{ + // Only Enables GameServer Hub. + protected override string[] HubTargetTags + { + get + { + return new[] { "GameServer" }; + } + } + + protected override void SetupCore() + { + // Load from Configuration file. + foreach (var item in PhotonWire.Server.Configuration.PhotonWireConfigurationSection.GetSection().GetConnectionList()) + { + var ip = new IPEndPoint(IPAddress.Parse(item.IPAddress), item.Port); + var _ = ConnectToOutboundServerAsync(ip, item.ApplicationName); + } + } +} +``` + +Filter +--- +PhotonWire supports OWIN like filter. + +```csharp +public class TestFilter : PhotonWireFilterAttribute +{ + public override async Task Invoke(OperationContext context, Func> next) + { + var path = context.Hub.HubName + "/" + context.Method.MethodName; + try + { + Debug.WriteLine("Before:" + path + " - " + context.Peer.PeerKind); + var result = await next(); + Debug.WriteLine("After:" + path); + return result; + } + catch (Exception ex) + { + Debug.WriteLine("Ex " + path + " :" + ex.ToString()); + throw; + } + finally + { + Debug.WriteLine("Finally:" + path); + } + } +} + +[Hub(3)] +public class MasterTest : ServerHub +{ + [TestFilter] // use filter + [Operation(5)] + public virtual async Task EchoAsync(string msg) + { + return msg; + } +} +``` + +PeerManager +--- +[PeerManager](https://github.com/neuecc/PhotonWire/wiki/PhotonWire.Server#peermanager) is global storage of peer and peer groups. + +Logging, Monitoring +--- +Default logging uses EventSource. You can monitor easily by [EtwStream](https://github.com/neuecc/EtwStream/). + +```csharp +ObservableEventListener.FromTraceEvent("PhotonWire").DumpWithColor(); +``` + +Logging point list can see [IPhotonWireLogger reference](https://github.com/neuecc/PhotonWire/wiki/PhotonWire.Server.Diagnostics#iphotonwirelogger). + +References +--- +Available at [GitHub/PhotonWire/wiki](https://github.com/neuecc/PhotonWire/wiki). + +Help & Contribute +--- +Ask me any questions to GitHub issues. + +Author Info +--- +Yoshifumi Kawai(a.k.a. neuecc) is a software developer in Japan. +He is the Director/CTO at Grani, Inc. +Grani is a top social game developer in Japan. +He is awarding Microsoft MVP for Visual C# since 2011. +He is known as the creator of [UniRx](https://github.com/neuecc/UniRx/)(Reactive Extensions for Unity) + +Blog: http://neue.cc/ (Japanese) +Twitter: https://twitter.com/neuecc (Japanese) + +License +--- +This library is under the MIT License. \ No newline at end of file diff --git a/Sample/PhotonWire.Sample.ConsoleApp/PhotonWire.Sample.ConsoleApp.csproj b/Sample/PhotonWire.Sample.ConsoleApp/PhotonWire.Sample.ConsoleApp.csproj index 50aee4a..7f86647 100644 --- a/Sample/PhotonWire.Sample.ConsoleApp/PhotonWire.Sample.ConsoleApp.csproj +++ b/Sample/PhotonWire.Sample.ConsoleApp/PhotonWire.Sample.ConsoleApp.csproj @@ -70,6 +70,11 @@ + + True + True + PhotonWireProxy.tt + @@ -82,6 +87,19 @@ {d08fa876-5c52-4a74-87bd-1537bdc6a075} PhotonWire.Client + + {80a1868d-49ea-4f8f-9153-91072565b6da} + PhotonWire.Sample.Share + + + + + TextTemplatingFileGenerator + PhotonWireProxy.Generated.cs + + + + + 8 @@ -16,6 +17,7 @@ UnhandledExceptionPolicy="Ignore"> + + PhotonWire.Analyzer - 1.1.2.3 + 1.0.0 PhotonWire.Analyzer neuecc neuecc https://github.com/neuecc/PhotonWire false Analyzers for PhotonWire, verify rule for create hubs. - Check DataMemberAttribute without IgnoreDataMemberAttribute. + Initial release. Photon, PhotonServer, PhotonWire, analyzers diff --git a/Source/PhotonWire.Analyzer/Properties/AssemblyInfo.cs b/Source/PhotonWire.Analyzer/Properties/AssemblyInfo.cs index 24007cf..6398e04 100644 --- a/Source/PhotonWire.Analyzer/Properties/AssemblyInfo.cs +++ b/Source/PhotonWire.Analyzer/Properties/AssemblyInfo.cs @@ -26,5 +26,5 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.2.3")] -[assembly: AssemblyFileVersion("1.1.2.3")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] \ No newline at end of file diff --git a/Source/PhotonWire.Client/PhotonWire.Client.csproj b/Source/PhotonWire.Client/PhotonWire.Client.csproj index 6130727..0ca901a 100644 --- a/Source/PhotonWire.Client/PhotonWire.Client.csproj +++ b/Source/PhotonWire.Client/PhotonWire.Client.csproj @@ -22,6 +22,7 @@ DEBUG;TRACE prompt 4 + 1591 pdbonly @@ -30,6 +31,8 @@ TRACE prompt 4 + bin\Release\PhotonWire.Client.xml + 1591 diff --git a/Source/PhotonWire.Client/Properties/AssemblyInfo.cs b/Source/PhotonWire.Client/Properties/AssemblyInfo.cs index b6e1e95..d9790c2 100644 --- a/Source/PhotonWire.Client/Properties/AssemblyInfo.cs +++ b/Source/PhotonWire.Client/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] diff --git a/Source/PhotonWire.HubInvoker/PhotonWire.HubInvoker.csproj b/Source/PhotonWire.HubInvoker/PhotonWire.HubInvoker.csproj index 5064a7f..2c9b014 100644 --- a/Source/PhotonWire.HubInvoker/PhotonWire.HubInvoker.csproj +++ b/Source/PhotonWire.HubInvoker/PhotonWire.HubInvoker.csproj @@ -1,4 +1,4 @@ - + @@ -31,7 +31,7 @@ AnyCPU pdbonly true - bin\PhotonWire.HubInvoker\ + bin\Release\ TRACE prompt 4 diff --git a/Source/PhotonWire.HubInvoker/Properties/AssemblyInfo.cs b/Source/PhotonWire.HubInvoker/Properties/AssemblyInfo.cs index 080ba26..d8ef6d4 100644 --- a/Source/PhotonWire.HubInvoker/Properties/AssemblyInfo.cs +++ b/Source/PhotonWire.HubInvoker/Properties/AssemblyInfo.cs @@ -20,5 +20,5 @@ )] -[assembly: AssemblyVersion("1.2.3.0")] -[assembly: AssemblyFileVersion("1.2.3.0")] +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] diff --git a/Source/PhotonWire.Server/Hub.cs b/Source/PhotonWire.Server/Hub.cs index 41f47b1..6c2aa12 100644 --- a/Source/PhotonWire.Server/Hub.cs +++ b/Source/PhotonWire.Server/Hub.cs @@ -63,7 +63,7 @@ protected ServerHubClientProxy GetServerHubProxy() where TServerHub : ServerHub { var hubContext = PeerManager.GetServerHubContext(); - return hubContext.Peers; + return hubContext.Clients; } } diff --git a/Source/PhotonWire.Server/Properties/AssemblyInfo.cs b/Source/PhotonWire.Server/Properties/AssemblyInfo.cs index 1f2ae07..f2ac6ba 100644 --- a/Source/PhotonWire.Server/Properties/AssemblyInfo.cs +++ b/Source/PhotonWire.Server/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.2.0")] +[assembly: AssemblyFileVersion("1.0.2.0")] diff --git a/Source/PhotonWire.Server/ServerToServer/ServerHubContext.cs b/Source/PhotonWire.Server/ServerToServer/ServerHubContext.cs index 33ae03f..8500034 100644 --- a/Source/PhotonWire.Server/ServerToServer/ServerHubContext.cs +++ b/Source/PhotonWire.Server/ServerToServer/ServerHubContext.cs @@ -29,7 +29,7 @@ public class ServerHubContext : IServerHubContext { public HubDescriptor Hub { get; } public SendParameters SendParameters { get; } - public ServerHubClientProxy Peers { get; } + public ServerHubClientProxy Clients { get; } readonly IPhotonSerializer serializer; @@ -42,7 +42,7 @@ public ServerHubContext(HubDescriptor hub, SendParameters sendParameters) { this.Hub = hub; this.SendParameters = sendParameters; - this.Peers = new ServerHubClientProxy(this); + this.Clients = new ServerHubClientProxy(this); this.serializer = ((PhotonWireApplicationBase)PhotonWireApplicationBase.Instance).Serializer; } diff --git a/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.Generated.cs b/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.Generated.cs index 12733fd..df58107 100644 --- a/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.Generated.cs +++ b/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.Generated.cs @@ -91,7 +91,7 @@ public class PhotonMsgPackSerializer : PhotonSerializerBase SerializationMethod = MsgPack.Serialization.SerializationMethod.Array }; - readonly System.Collections.Generic.Dictionary> setSerializers = new System.Collections.Generic.Dictionary>(15); + readonly System.Collections.Generic.Dictionary> setSerializers = new System.Collections.Generic.Dictionary>(12); public PhotonMsgPackSerializer() { @@ -109,9 +109,6 @@ public PhotonMsgPackSerializer() setSerializers.Add(typeof(PhotonWire.Sample.ServerApp.Hubs.MyClass2), e => e.SetSerializer(new PhotonWire.Client.GeneratedSerializers.PhotonWire_Sample_ServerApp_Hubs_MyClass2Serializer(e.Context))); setSerializers.Add(typeof(PhotonWire.Sample.ServerApp.Hubs.Yo), e => e.SetSerializer(new PhotonWire.Client.GeneratedSerializers.PhotonWire_Sample_ServerApp_Hubs_YoSerializer(e.Context))); setSerializers.Add(typeof(PhotonWire.Sample.ServerApp.Hubs.Yo?), e => e.SetSerializer(new PhotonWire.Client.GeneratedSerializers.System_Nullable_1_PhotonWire_Sample_ServerApp_Hubs_Yo_Serializer(e.Context))); - setSerializers.Add(typeof(PhotonWire.Sample.ServerApp.Hubs.Takox), e => e.SetSerializer(new PhotonWire.Client.GeneratedSerializers.PhotonWire_Sample_ServerApp_Hubs_TakoxSerializer(e.Context))); - setSerializers.Add(typeof(PhotonWire.Sample.ServerApp.Hubs.Yappy), e => e.SetSerializer(new PhotonWire.Client.GeneratedSerializers.PhotonWire_Sample_ServerApp_Hubs_YappySerializer(e.Context))); - setSerializers.Add(typeof(PhotonWire.Sample.ServerApp.Hubs.MoreYappy), e => e.SetSerializer(new PhotonWire.Client.GeneratedSerializers.PhotonWire_Sample_ServerApp_Hubs_MoreYappySerializer(e.Context))); MsgPack.Serialization.MessagePackSerializer.PrepareType(); @@ -619,13 +616,13 @@ public interface INoClient } } - public class TestHubProxy : PhotonWireProxy + public class ChatHubProxy : PhotonWireProxy { public override short HubId { get { - return 1; + return 9; } } @@ -633,29 +630,29 @@ public override string HubName { get { - return "TestHub"; + return "ChatHub"; } } - TestHubServer invoke; - public override TestHubServer Invoke + ChatHubServer invoke; + public override ChatHubServer Invoke { get { - return invoke ?? (invoke = new TestHubServer(Peer, HubId)); + return invoke ?? (invoke = new ChatHubServer(Peer, HubId)); } } - TestHubClient receive; - public override TestHubClient Receive + ChatHubClient receive; + public override ChatHubClient Receive { get { - return receive ?? (receive = new TestHubClient(Peer, HubId)); + return receive ?? (receive = new ChatHubClient(Peer, HubId)); } } - public override IDisposable RegisterListener(IMyClient clientListener, bool runOnMainThread = true) + public override IDisposable RegisterListener(IChatClient clientListener, bool runOnMainThread = true) { return Peer.ObserveReceiveEventData().Subscribe(__args => { @@ -671,45 +668,43 @@ public override IDisposable RegisterListener(IMyClient clientListener, bool runO var __parameters = __args.Parameters; switch (__args.Code) { - case 10: + case 0: { - var xxx = PhotonSerializer.Deserialize(__parameters[0]); + var userName = PhotonSerializer.Deserialize(__parameters[0]); + var message = PhotonSerializer.Deserialize(__parameters[1]); if(runOnMainThread) { - Scheduler.MainThread.Schedule(() => clientListener.Chop(xxx)); + Scheduler.MainThread.Schedule(() => clientListener.ReceiveMessage(userName, message)); } else { - clientListener.Chop(xxx); + clientListener.ReceiveMessage(userName, message); } } break; - case 110: + case 1: { - var x = PhotonSerializer.Deserialize(__parameters[0]); - var y = PhotonSerializer.Deserialize(__parameters[1]); - var z = PhotonSerializer.Deserialize(__parameters[2]); - var xyz = PhotonSerializer.Deserialize(__parameters[3]); + var userName = PhotonSerializer.Deserialize(__parameters[0]); if(runOnMainThread) { - Scheduler.MainThread.Schedule(() => clientListener.Kick(x, y, z, xyz)); + Scheduler.MainThread.Schedule(() => clientListener.JoinUser(userName)); } else { - clientListener.Kick(x, y, z, xyz); + clientListener.JoinUser(userName); } } break; - case 150: + case 2: { - var yo = PhotonSerializer.Deserialize(__parameters[0]); + var userName = PhotonSerializer.Deserialize(__parameters[0]); if(runOnMainThread) { - Scheduler.MainThread.Schedule(() => clientListener.YoYo(yo)); + Scheduler.MainThread.Schedule(() => clientListener.LeaveUser(userName)); } else { - clientListener.YoYo(yo); + clientListener.LeaveUser(userName); } } break; @@ -719,57 +714,75 @@ public override IDisposable RegisterListener(IMyClient clientListener, bool runO }); } - public class TestHubServer + public class ChatHubServer { readonly ObservablePhotonPeer peer; readonly short hubId; - public TestHubServer(ObservablePhotonPeer peer, short hubId) + public ChatHubServer(ObservablePhotonPeer peer, short hubId) { this.peer = peer; this.hubId = hubId; } - public IObservable EchoAsync(System.String str, bool observeOnMainThread = true) + public IObservable CreateRoomAsync(System.String roomName, System.String userName, bool observeOnMainThread = true) { - byte opCode = 2; + byte opCode = 0; + var parameter = new System.Collections.Generic.Dictionary(); + parameter.Add(ReservedParameterNo.RequestHubId, hubId); + parameter.Add(0, PhotonSerializer.Serialize(roomName)); + parameter.Add(1, PhotonSerializer.Serialize(userName)); + + var __response = peer.OpCustomAsync(opCode, parameter, true) + .Select(__operationResponse => + { + var __result = __operationResponse[ReservedParameterNo.ResponseId]; + return PhotonSerializer.Deserialize(__result); + }); + + return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; + } + + public IObservable GetRoomsAsync(bool observeOnMainThread = true) + { + byte opCode = 1; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(str)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable DoNothingAsync(System.Int32 x, PhotonWire.Sample.ServerApp.Hubs.Takox y, bool observeOnMainThread = true) + public IObservable GetRoomMembersAsync(System.String roomId, bool observeOnMainThread = true) { - byte opCode = 3; + byte opCode = 2; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(x)); - parameter.Add(1, PhotonSerializer.Serialize(y)); + parameter.Add(0, PhotonSerializer.Serialize(roomId)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable DoAsyncingAsync(bool observeOnMainThread = true) + public IObservable PublishMessageAsync(System.String roomId, System.String message, bool observeOnMainThread = true) { - byte opCode = 4; + byte opCode = 3; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); + parameter.Add(0, PhotonSerializer.Serialize(roomId)); + parameter.Add(1, PhotonSerializer.Serialize(message)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => @@ -781,36 +794,36 @@ public IObservable DoAsyncingAsync(bool observeOnMainThread = true) return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable AsyncRRRAsync(PhotonWire.Sample.ServerApp.Hubs.Takox[] takoman, bool observeOnMainThread = true) + public IObservable JoinRoomAsync(System.String roomId, System.String userName, bool observeOnMainThread = true) { - byte opCode = 5; + byte opCode = 4; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(takoman)); + parameter.Add(0, PhotonSerializer.Serialize(roomId)); + parameter.Add(1, PhotonSerializer.Serialize(userName)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable SumAsync(System.Int32 x, System.Int32 y, bool observeOnMainThread = true) + public IObservable LeaveRoomAsync(System.String roomId, bool observeOnMainThread = true) { - byte opCode = 6; + byte opCode = 5; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(x)); - parameter.Add(1, PhotonSerializer.Serialize(y)); + parameter.Add(0, PhotonSerializer.Serialize(roomId)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; @@ -818,12 +831,12 @@ public IObservable DoAsyncingAsync(bool observeOnMainThread = true) } - public class TestHubClient + public class ChatHubClient { readonly ObservablePhotonPeer peer; readonly short hubId; - public TestHubClient(ObservablePhotonPeer peer, short hubId) + public ChatHubClient(ObservablePhotonPeer peer, short hubId) { this.peer = peer; this.hubId = hubId; @@ -847,41 +860,39 @@ IObservable ReceiveEventData(byte eventCode) }); } - public IObservable Chop(bool observeOnMainThread = true) + public IObservable ReceiveMessage(bool observeOnMainThread = true) { - var __result = ReceiveEventData(10) + var __result = ReceiveEventData(0) .Select(__args => { - return PhotonSerializer.Deserialize(__args.Parameters[0]); + var ____result = new ChatClientReceiveMessageResponse + { + userName = PhotonSerializer.Deserialize(__args.Parameters[0]), + message = PhotonSerializer.Deserialize(__args.Parameters[1]), + }; + return ____result; }); return (observeOnMainThread) ? __result.ObserveOn(Scheduler.MainThread) : __result; } - public IObservable Kick(bool observeOnMainThread = true) + public IObservable JoinUser(bool observeOnMainThread = true) { - var __result = ReceiveEventData(110) + var __result = ReceiveEventData(1) .Select(__args => { - var ____result = new MyClientKickResponse - { - x = PhotonSerializer.Deserialize(__args.Parameters[0]), - y = PhotonSerializer.Deserialize(__args.Parameters[1]), - z = PhotonSerializer.Deserialize(__args.Parameters[2]), - xyz = PhotonSerializer.Deserialize(__args.Parameters[3]), - }; - return ____result; + return PhotonSerializer.Deserialize(__args.Parameters[0]); }); return (observeOnMainThread) ? __result.ObserveOn(Scheduler.MainThread) : __result; } - public IObservable YoYo(bool observeOnMainThread = true) + public IObservable LeaveUser(bool observeOnMainThread = true) { - var __result = ReceiveEventData(150) + var __result = ReceiveEventData(2) .Select(__args => { - return PhotonSerializer.Deserialize(__args.Parameters[0]); + return PhotonSerializer.Deserialize(__args.Parameters[0]); }); return (observeOnMainThread) ? __result.ObserveOn(Scheduler.MainThread) : __result; @@ -889,30 +900,28 @@ public IObservable Kick(bool observeOnMainThread = true) } - public interface IMyClient + public interface IChatClient { - void Chop(System.String xxx); - void Kick(System.Int32 x, System.Int32 y, System.String z, PhotonWire.Sample.ServerApp.Hubs.Yappy xyz); - void YoYo(PhotonWire.Sample.ServerApp.Hubs.Yo yo); + void ReceiveMessage(System.String userName, System.String message); + void JoinUser(System.String userName); + void LeaveUser(System.String userName); } - public class MyClientKickResponse + public class ChatClientReceiveMessageResponse { - public System.Int32 x { get; set; } - public System.Int32 y { get; set; } - public System.String z { get; set; } - public PhotonWire.Sample.ServerApp.Hubs.Yappy xyz { get; set; } + public System.String userName { get; set; } + public System.String message { get; set; } } } - public class ChatHubProxy : PhotonWireProxy + public class TutorialProxy : PhotonWireProxy { public override short HubId { get { - return 9; + return 100; } } @@ -920,29 +929,29 @@ public override string HubName { get { - return "ChatHub"; + return "Tutorial"; } } - ChatHubServer invoke; - public override ChatHubServer Invoke + TutorialServer invoke; + public override TutorialServer Invoke { get { - return invoke ?? (invoke = new ChatHubServer(Peer, HubId)); + return invoke ?? (invoke = new TutorialServer(Peer, HubId)); } } - ChatHubClient receive; - public override ChatHubClient Receive + TutorialClient receive; + public override TutorialClient Receive { get { - return receive ?? (receive = new ChatHubClient(Peer, HubId)); + return receive ?? (receive = new TutorialClient(Peer, HubId)); } } - public override IDisposable RegisterListener(IChatClient clientListener, bool runOnMainThread = true) + public override IDisposable RegisterListener(ITutorialClient clientListener, bool runOnMainThread = true) { return Peer.ObserveReceiveEventData().Subscribe(__args => { @@ -960,41 +969,14 @@ public override IDisposable RegisterListener(IChatClient clientListener, bool ru { case 0: { - var userName = PhotonSerializer.Deserialize(__parameters[0]); - var message = PhotonSerializer.Deserialize(__parameters[1]); - if(runOnMainThread) - { - Scheduler.MainThread.Schedule(() => clientListener.ReceiveMessage(userName, message)); - } - else - { - clientListener.ReceiveMessage(userName, message); - } - } - break; - case 1: - { - var userName = PhotonSerializer.Deserialize(__parameters[0]); - if(runOnMainThread) - { - Scheduler.MainThread.Schedule(() => clientListener.JoinUser(userName)); - } - else - { - clientListener.JoinUser(userName); - } - } - break; - case 2: - { - var userName = PhotonSerializer.Deserialize(__parameters[0]); + var message = PhotonSerializer.Deserialize(__parameters[0]); if(runOnMainThread) { - Scheduler.MainThread.Schedule(() => clientListener.LeaveUser(userName)); + Scheduler.MainThread.Schedule(() => clientListener.GroupBroadcastMessage(message)); } else { - clientListener.LeaveUser(userName); + clientListener.GroupBroadcastMessage(message); } } break; @@ -1004,75 +986,75 @@ public override IDisposable RegisterListener(IChatClient clientListener, bool ru }); } - public class ChatHubServer + public class TutorialServer { readonly ObservablePhotonPeer peer; readonly short hubId; - public ChatHubServer(ObservablePhotonPeer peer, short hubId) + public TutorialServer(ObservablePhotonPeer peer, short hubId) { this.peer = peer; this.hubId = hubId; } - public IObservable CreateRoomAsync(System.String roomName, System.String userName, bool observeOnMainThread = true) + public IObservable SumAsync(System.Int32 x, System.Int32 y, bool observeOnMainThread = true) { byte opCode = 0; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(roomName)); - parameter.Add(1, PhotonSerializer.Serialize(userName)); + parameter.Add(0, PhotonSerializer.Serialize(x)); + parameter.Add(1, PhotonSerializer.Serialize(y)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable GetRoomsAsync(bool observeOnMainThread = true) + public IObservable GetHtmlAsync(System.String url, bool observeOnMainThread = true) { byte opCode = 1; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); + parameter.Add(0, PhotonSerializer.Serialize(url)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable GetRoomMembersAsync(System.String roomId, bool observeOnMainThread = true) + public IObservable BroadcastAllAsync(System.String message, bool observeOnMainThread = true) { byte opCode = 2; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(roomId)); + parameter.Add(0, PhotonSerializer.Serialize(message)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable PublishMessageAsync(System.String roomId, System.String message, bool observeOnMainThread = true) + public IObservable RegisterGroupAsync(System.String groupName, bool observeOnMainThread = true) { byte opCode = 3; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(roomId)); - parameter.Add(1, PhotonSerializer.Serialize(message)); + parameter.Add(0, PhotonSerializer.Serialize(groupName)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => @@ -1084,13 +1066,13 @@ public IObservable PublishMessageAsync(System.String roomId, System.String return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable JoinRoomAsync(System.String roomId, System.String userName, bool observeOnMainThread = true) + public IObservable BroadcastToAsync(System.String groupName, System.String message, bool observeOnMainThread = true) { byte opCode = 4; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(roomId)); - parameter.Add(1, PhotonSerializer.Serialize(userName)); + parameter.Add(0, PhotonSerializer.Serialize(groupName)); + parameter.Add(1, PhotonSerializer.Serialize(message)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => @@ -1102,18 +1084,19 @@ public IObservable JoinRoomAsync(System.String roomId, System.String userN return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; } - public IObservable LeaveRoomAsync(System.String roomId, bool observeOnMainThread = true) + public IObservable ServerToServerAsync(System.Int32 x, System.Int32 y, bool observeOnMainThread = true) { byte opCode = 5; var parameter = new System.Collections.Generic.Dictionary(); parameter.Add(ReservedParameterNo.RequestHubId, hubId); - parameter.Add(0, PhotonSerializer.Serialize(roomId)); + parameter.Add(0, PhotonSerializer.Serialize(x)); + parameter.Add(1, PhotonSerializer.Serialize(y)); var __response = peer.OpCustomAsync(opCode, parameter, true) .Select(__operationResponse => { var __result = __operationResponse[ReservedParameterNo.ResponseId]; - return PhotonSerializer.Deserialize(__result); + return PhotonSerializer.Deserialize(__result); }); return (observeOnMainThread) ? __response.ObserveOn(Scheduler.MainThread) : __response; @@ -1121,12 +1104,12 @@ public IObservable LeaveRoomAsync(System.String roomId, bool observeOnMain } - public class ChatHubClient + public class TutorialClient { readonly ObservablePhotonPeer peer; readonly short hubId; - public ChatHubClient(ObservablePhotonPeer peer, short hubId) + public TutorialClient(ObservablePhotonPeer peer, short hubId) { this.peer = peer; this.hubId = hubId; @@ -1150,36 +1133,9 @@ IObservable ReceiveEventData(byte eventCode) }); } - public IObservable ReceiveMessage(bool observeOnMainThread = true) + public IObservable GroupBroadcastMessage(bool observeOnMainThread = true) { var __result = ReceiveEventData(0) - .Select(__args => - { - var ____result = new ChatClientReceiveMessageResponse - { - userName = PhotonSerializer.Deserialize(__args.Parameters[0]), - message = PhotonSerializer.Deserialize(__args.Parameters[1]), - }; - return ____result; - }); - - return (observeOnMainThread) ? __result.ObserveOn(Scheduler.MainThread) : __result; - } - - public IObservable JoinUser(bool observeOnMainThread = true) - { - var __result = ReceiveEventData(1) - .Select(__args => - { - return PhotonSerializer.Deserialize(__args.Parameters[0]); - }); - - return (observeOnMainThread) ? __result.ObserveOn(Scheduler.MainThread) : __result; - } - - public IObservable LeaveUser(bool observeOnMainThread = true) - { - var __result = ReceiveEventData(2) .Select(__args => { return PhotonSerializer.Deserialize(__args.Parameters[0]); @@ -1190,18 +1146,9 @@ public IObservable ReceiveMessage(bool observe } - public interface IChatClient - { - void ReceiveMessage(System.String userName, System.String message); - void JoinUser(System.String userName); - void LeaveUser(System.String userName); - } - - - public class ChatClientReceiveMessageResponse + public interface ITutorialClient { - public System.String userName { get; set; } - public System.String message { get; set; } + void GroupBroadcastMessage(System.String message); } } @@ -1811,453 +1758,6 @@ private static T @__Conditional(bool condition, T whenTrue, T whenFalse) } } -namespace PhotonWire.Client.GeneratedSerializers { - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public class PhotonWire_Sample_ServerApp_Hubs_TakoxSerializer : MsgPack.Serialization.MessagePackSerializer { - - private MsgPack.Serialization.MessagePackSerializer _serializer0; - - public PhotonWire_Sample_ServerApp_Hubs_TakoxSerializer(MsgPack.Serialization.SerializationContext context) : - base(context) { - MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema); - schema0 = null; - this._serializer0 = context.GetSerializer(schema0); - } - - protected override void PackToCore(MsgPack.Packer packer, PhotonWire.Sample.ServerApp.Hubs.Takox objectTree) { - packer.PackArrayHeader(1); - this._serializer0.PackTo(packer, objectTree.MyTakox); - } - - protected override PhotonWire.Sample.ServerApp.Hubs.Takox UnpackFromCore(MsgPack.Unpacker unpacker) { - PhotonWire.Sample.ServerApp.Hubs.Takox result = default(PhotonWire.Sample.ServerApp.Hubs.Takox); - result = new PhotonWire.Sample.ServerApp.Hubs.Takox(); - if (unpacker.IsArrayHeader) { - int unpacked = default(int); - int itemsCount = default(int); - itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); - System.Nullable nullable = default(System.Nullable); - if ((unpacked < itemsCount)) { - nullable = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Takox), "Int32 MyTakox"); - } - if (nullable.HasValue) { - result.MyTakox = nullable.Value; - } - unpacked = (unpacked + 1); - } - else { - int itemsCount0 = default(int); - itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); - for (int i = 0; (i < itemsCount0); i = (i + 1)) { - string key = default(string); - string nullable0 = default(string); - nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Takox), "MemberName"); - if (((nullable0 == null) - == false)) { - key = nullable0; - } - else { - throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); - } - if ((key == "MyTakox")) { - System.Nullable nullable1 = default(System.Nullable); - nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Takox), "Int32 MyTakox"); - if (nullable1.HasValue) { - result.MyTakox = nullable1.Value; - } - } - else { - unpacker.Skip(); - } - } - } - return result; - } - - private static T @__Conditional(bool condition, T whenTrue, T whenFalse) - { - if (condition) { - return whenTrue; - } - else { - return whenFalse; - } - } - } -} - -namespace PhotonWire.Client.GeneratedSerializers { - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public class PhotonWire_Sample_ServerApp_Hubs_YappySerializer : MsgPack.Serialization.MessagePackSerializer { - - private MsgPack.Serialization.MessagePackSerializer _serializer0; - - private MsgPack.Serialization.MessagePackSerializer _serializer1; - - private MsgPack.Serialization.MessagePackSerializer _serializer2; - - private MsgPack.Serialization.MessagePackSerializer _serializer3; - - public PhotonWire_Sample_ServerApp_Hubs_YappySerializer(MsgPack.Serialization.SerializationContext context) : - base(context) { - MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema); - schema0 = null; - this._serializer0 = context.GetSerializer(schema0); - MsgPack.Serialization.PolymorphismSchema schema1 = default(MsgPack.Serialization.PolymorphismSchema); - schema1 = null; - this._serializer1 = context.GetSerializer(schema1); - MsgPack.Serialization.PolymorphismSchema schema2 = default(MsgPack.Serialization.PolymorphismSchema); - schema2 = null; - this._serializer2 = context.GetSerializer(schema2); - MsgPack.Serialization.PolymorphismSchema schema3 = default(MsgPack.Serialization.PolymorphismSchema); - schema3 = null; - this._serializer3 = context.GetSerializer(schema3); - } - - protected override void PackToCore(MsgPack.Packer packer, PhotonWire.Sample.ServerApp.Hubs.Yappy objectTree) { - packer.PackArrayHeader(4); - this._serializer0.PackTo(packer, objectTree.Moge); - this._serializer1.PackTo(packer, objectTree.MoreMoreMore); - this._serializer2.PackTo(packer, objectTree.MyProperty); - this._serializer3.PackTo(packer, objectTree.YappyArray); - } - - protected override PhotonWire.Sample.ServerApp.Hubs.Yappy UnpackFromCore(MsgPack.Unpacker unpacker) { - PhotonWire.Sample.ServerApp.Hubs.Yappy result = default(PhotonWire.Sample.ServerApp.Hubs.Yappy); - result = new PhotonWire.Sample.ServerApp.Hubs.Yappy(); - if (unpacker.IsArrayHeader) { - int unpacked = default(int); - int itemsCount = default(int); - itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); - string nullable = default(string); - if ((unpacked < itemsCount)) { - nullable = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Yappy), "System.String Moge"); - } - if (((nullable == null) - == false)) { - result.Moge = nullable; - } - unpacked = (unpacked + 1); - PhotonWire.Sample.ServerApp.Hubs.MoreYappy nullable0 = default(PhotonWire.Sample.ServerApp.Hubs.MoreYappy); - if ((unpacked < itemsCount)) { - if ((unpacker.Read() == false)) { - throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(1); - } - if (((unpacker.IsArrayHeader == false) - && (unpacker.IsMapHeader == false))) { - nullable0 = this._serializer1.UnpackFrom(unpacker); - } - else { - MsgPack.Unpacker disposable = default(MsgPack.Unpacker); - disposable = unpacker.ReadSubtree(); - try { - nullable0 = this._serializer1.UnpackFrom(disposable); - } - finally { - if (((disposable == null) - == false)) { - disposable.Dispose(); - } - } - } - } - if (((nullable0 == null) - == false)) { - result.MoreMoreMore = nullable0; - } - unpacked = (unpacked + 1); - System.Nullable nullable1 = default(System.Nullable); - if ((unpacked < itemsCount)) { - nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Yappy), "Int32 MyProperty"); - } - if (nullable1.HasValue) { - result.MyProperty = nullable1.Value; - } - unpacked = (unpacked + 1); - PhotonWire.Sample.ServerApp.Hubs.MoreYappy[] nullable2 = default(PhotonWire.Sample.ServerApp.Hubs.MoreYappy[]); - if ((unpacked < itemsCount)) { - if ((unpacker.Read() == false)) { - throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(3); - } - if (((unpacker.IsArrayHeader == false) - && (unpacker.IsMapHeader == false))) { - nullable2 = this._serializer3.UnpackFrom(unpacker); - } - else { - MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); - disposable0 = unpacker.ReadSubtree(); - try { - nullable2 = this._serializer3.UnpackFrom(disposable0); - } - finally { - if (((disposable0 == null) - == false)) { - disposable0.Dispose(); - } - } - } - } - if (((nullable2 == null) - == false)) { - result.YappyArray = nullable2; - } - unpacked = (unpacked + 1); - } - else { - int itemsCount0 = default(int); - itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); - for (int i = 0; (i < itemsCount0); i = (i + 1)) { - string key = default(string); - string nullable3 = default(string); - nullable3 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Yappy), "MemberName"); - if (((nullable3 == null) - == false)) { - key = nullable3; - } - else { - throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); - } - if ((key == "YappyArray")) { - PhotonWire.Sample.ServerApp.Hubs.MoreYappy[] nullable7 = default(PhotonWire.Sample.ServerApp.Hubs.MoreYappy[]); - if ((unpacker.Read() == false)) { - throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); - } - if (((unpacker.IsArrayHeader == false) - && (unpacker.IsMapHeader == false))) { - nullable7 = this._serializer3.UnpackFrom(unpacker); - } - else { - MsgPack.Unpacker disposable2 = default(MsgPack.Unpacker); - disposable2 = unpacker.ReadSubtree(); - try { - nullable7 = this._serializer3.UnpackFrom(disposable2); - } - finally { - if (((disposable2 == null) - == false)) { - disposable2.Dispose(); - } - } - } - if (((nullable7 == null) - == false)) { - result.YappyArray = nullable7; - } - } - else { - if ((key == "MyProperty")) { - System.Nullable nullable6 = default(System.Nullable); - nullable6 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Yappy), "Int32 MyProperty"); - if (nullable6.HasValue) { - result.MyProperty = nullable6.Value; - } - } - else { - if ((key == "MoreMoreMore")) { - PhotonWire.Sample.ServerApp.Hubs.MoreYappy nullable5 = default(PhotonWire.Sample.ServerApp.Hubs.MoreYappy); - if ((unpacker.Read() == false)) { - throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); - } - if (((unpacker.IsArrayHeader == false) - && (unpacker.IsMapHeader == false))) { - nullable5 = this._serializer1.UnpackFrom(unpacker); - } - else { - MsgPack.Unpacker disposable1 = default(MsgPack.Unpacker); - disposable1 = unpacker.ReadSubtree(); - try { - nullable5 = this._serializer1.UnpackFrom(disposable1); - } - finally { - if (((disposable1 == null) - == false)) { - disposable1.Dispose(); - } - } - } - if (((nullable5 == null) - == false)) { - result.MoreMoreMore = nullable5; - } - } - else { - if ((key == "Moge")) { - string nullable4 = default(string); - nullable4 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.Yappy), "System.String Moge"); - if (((nullable4 == null) - == false)) { - result.Moge = nullable4; - } - } - else { - unpacker.Skip(); - } - } - } - } - } - } - return result; - } - - private static T @__Conditional(bool condition, T whenTrue, T whenFalse) - { - if (condition) { - return whenTrue; - } - else { - return whenFalse; - } - } - } -} - -namespace PhotonWire.Client.GeneratedSerializers { - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public class PhotonWire_Sample_ServerApp_Hubs_MoreYappySerializer : MsgPack.Serialization.MessagePackSerializer { - - private MsgPack.Serialization.MessagePackSerializer _serializer0; - - private MsgPack.Serialization.MessagePackSerializer _serializer1; - - private MsgPack.Serialization.MessagePackSerializer> _serializer2; - - public PhotonWire_Sample_ServerApp_Hubs_MoreYappySerializer(MsgPack.Serialization.SerializationContext context) : - base(context) { - MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema); - schema0 = null; - this._serializer0 = context.GetSerializer(schema0); - this._serializer1 = context.GetSerializer(MsgPack.Serialization.DateTimeMessagePackSerializerHelpers.DetermineDateTimeConversionMethod(context, MsgPack.Serialization.DateTimeMemberConversionMethod.Default)); - this._serializer2 = context.GetSerializer>(MsgPack.Serialization.DateTimeMessagePackSerializerHelpers.DetermineDateTimeConversionMethod(context, MsgPack.Serialization.DateTimeMemberConversionMethod.Default)); - } - - protected override void PackToCore(MsgPack.Packer packer, PhotonWire.Sample.ServerApp.Hubs.MoreYappy objectTree) { - packer.PackArrayHeader(2); - this._serializer0.PackTo(packer, objectTree.Dupe); - this._serializer1.PackTo(packer, objectTree.None); - } - - protected override PhotonWire.Sample.ServerApp.Hubs.MoreYappy UnpackFromCore(MsgPack.Unpacker unpacker) { - PhotonWire.Sample.ServerApp.Hubs.MoreYappy result = default(PhotonWire.Sample.ServerApp.Hubs.MoreYappy); - result = new PhotonWire.Sample.ServerApp.Hubs.MoreYappy(); - if (unpacker.IsArrayHeader) { - int unpacked = default(int); - int itemsCount = default(int); - itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); - System.Nullable nullable = default(System.Nullable); - if ((unpacked < itemsCount)) { - nullable = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.MoreYappy), "Int32 Dupe"); - } - if (nullable.HasValue) { - result.Dupe = nullable.Value; - } - unpacked = (unpacked + 1); - System.Nullable nullable0 = default(System.Nullable); - if ((unpacked < itemsCount)) { - if ((unpacker.Read() == false)) { - throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(1); - } - if (((unpacker.IsArrayHeader == false) - && (unpacker.IsMapHeader == false))) { - nullable0 = this._serializer2.UnpackFrom(unpacker); - } - else { - MsgPack.Unpacker disposable = default(MsgPack.Unpacker); - disposable = unpacker.ReadSubtree(); - try { - nullable0 = this._serializer2.UnpackFrom(disposable); - } - finally { - if (((disposable == null) - == false)) { - disposable.Dispose(); - } - } - } - } - if (nullable0.HasValue) { - result.None = nullable0.Value; - } - unpacked = (unpacked + 1); - } - else { - int itemsCount0 = default(int); - itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); - for (int i = 0; (i < itemsCount0); i = (i + 1)) { - string key = default(string); - string nullable1 = default(string); - nullable1 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.MoreYappy), "MemberName"); - if (((nullable1 == null) - == false)) { - key = nullable1; - } - else { - throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); - } - if ((key == "None")) { - System.Nullable nullable3 = default(System.Nullable); - if ((unpacker.Read() == false)) { - throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); - } - if (((unpacker.IsArrayHeader == false) - && (unpacker.IsMapHeader == false))) { - nullable3 = this._serializer2.UnpackFrom(unpacker); - } - else { - MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); - disposable0 = unpacker.ReadSubtree(); - try { - nullable3 = this._serializer2.UnpackFrom(disposable0); - } - finally { - if (((disposable0 == null) - == false)) { - disposable0.Dispose(); - } - } - } - if (nullable3.HasValue) { - result.None = nullable3.Value; - } - } - else { - if ((key == "Dupe")) { - System.Nullable nullable2 = default(System.Nullable); - nullable2 = MsgPack.Serialization.UnpackHelpers.UnpackNullableInt32Value(unpacker, typeof(PhotonWire.Sample.ServerApp.Hubs.MoreYappy), "Int32 Dupe"); - if (nullable2.HasValue) { - result.Dupe = nullable2.Value; - } - } - else { - unpacker.Skip(); - } - } - } - } - return result; - } - - private static T @__Conditional(bool condition, T whenTrue, T whenFalse) - { - if (condition) { - return whenTrue; - } - else { - return whenFalse; - } - } - } -} - #pragma warning disable 168 #pragma warning restore 414 #pragma warning restore 618 diff --git a/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.tt b/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.tt index f5a9c04..eb6051b 100644 --- a/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.tt +++ b/Source/PhotonWire.UnityClient/Assets/Plugins/PhotonWire/PhotonWireProxy.tt @@ -75,19 +75,11 @@ EnumSerializationMethod = EnumSerializationMethod.ByUnderlyingValue }; - var alreadyGenerated = new HashSet(); - var specializedSerializers = new HashSet(new TargetTypeComparer()); + var generateTarget = new HashSet(); Action RegisterSerializer = null; RegisterSerializer = type => { - if (!alreadyGenerated.Add(type)) return; - - var outputSerializers = SerializerGenerator.GenerateSerializerSourceCodes(settings, type).ToArray(); - if (outputSerializers.Length == 0) return; - foreach (var item in outputSerializers) - { - specializedSerializers.Add(item); - } + generateTarget.Add(type); }; var typeFromAssemblies = System.AppDomain.CurrentDomain @@ -233,6 +225,8 @@ }) .ToArray(); + var generateResult = SerializerGenerator.GenerateSerializerSourceCodes(settings, generateTarget.ToArray()); + var specializedSerializers = new HashSet(generateResult, new TargetTypeComparer()); var serializerFileSeq = specializedSerializers.Select(x => File.ReadLines(x.FilePath).SkipWhile(y => y.StartsWith("//"))); #> #pragma warning disable 618 diff --git a/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Editor.Plugins.csproj b/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Editor.Plugins.csproj index afbc4eb..5c5f770 100644 --- a/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Editor.Plugins.csproj +++ b/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Editor.Plugins.csproj @@ -17,7 +17,7 @@ EditorPlugins:7 StandaloneWindows:5 - 5.3.4p1 + 5.4.0b16 4 @@ -29,7 +29,7 @@ Temp\UnityVS_obj\Debug\ prompt 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE false @@ -39,7 +39,7 @@ Temp\UnityVS_obj\Release\ prompt 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE false @@ -96,42 +96,18 @@ Library\UnityAssemblies\SyntaxTree.VisualStudio.Unity.Bridge.dll - - Library\UnityAssemblies\UnityEditor.EditorTestsRunner.dll - - - Library\UnityAssemblies\UnityEditor.Networking.dll - - - Library\UnityAssemblies\nunit.framework.dll - - - Library\UnityAssemblies\UnityEditor.UI.dll - - - Library\UnityAssemblies\UnityEngine.Networking.dll - - - Library\UnityAssemblies\UnityEditor.Advertisements.dll - - - Library\UnityAssemblies\UnityEditor.TreeEditor.dll - - - Library\UnityAssemblies\UnityEngine.UI.dll - Library\UnityAssemblies\UnityEditor.iOS.Extensions.Xcode.dll Library\UnityAssemblies\UnityEditor.iOS.Extensions.Common.dll - - Assets\Plugins\Dll\Photon3Unity3D.dll - Assets\Plugins\Dll\MsgPack.dll + + Assets\Plugins\Dll\Photon3Unity3D.dll + Assets\Sandbox\PhotonWire.Sample.Share.dll diff --git a/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Plugins.csproj b/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Plugins.csproj index 8d394a2..f76874f 100644 --- a/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Plugins.csproj +++ b/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.Plugins.csproj @@ -17,7 +17,7 @@ GamePlugins:3 StandaloneWindows:5 - 5.3.4p1 + 5.4.0b16 4 @@ -29,7 +29,7 @@ Temp\UnityVS_obj\Debug\ prompt 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE false @@ -39,7 +39,7 @@ Temp\UnityVS_obj\Release\ prompt 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE false @@ -60,12 +60,6 @@ Library\UnityAssemblies\UnityEngine.Networking.dll - - Library\UnityAssemblies\UnityEngine.Networking.dll - - - Library\UnityAssemblies\UnityEngine.UI.dll - Library\UnityAssemblies\UnityEditor.dll @@ -75,12 +69,12 @@ Library\UnityAssemblies\UnityEditor.iOS.Extensions.Common.dll - - Assets\Plugins\Dll\Photon3Unity3D.dll - Assets\Plugins\Dll\MsgPack.dll + + Assets\Plugins\Dll\Photon3Unity3D.dll + Assets\Sandbox\PhotonWire.Sample.Share.dll diff --git a/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.csproj b/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.csproj index 423fa90..265ed65 100644 --- a/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.csproj +++ b/Source/PhotonWire.UnityClient/PhotonWire.UnityClient.CSharp.csproj @@ -17,7 +17,7 @@ Game:1 StandaloneWindows:5 - 5.3.4p1 + 5.4.0b16 4 @@ -29,7 +29,7 @@ Temp\UnityVS_obj\Debug\ prompt 4 - DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE false @@ -39,7 +39,7 @@ Temp\UnityVS_obj\Release\ prompt 4 - TRACE;UNITY_5_3_OR_NEWER;UNITY_5_3_4;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;UNITY_PRO_LICENSE + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_4_0;UNITY_5_4;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_EDITOR_RETINA;ENABLE_RETINA_GUISTYLES;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE false @@ -60,12 +60,6 @@ Library\UnityAssemblies\UnityEngine.Networking.dll - - Library\UnityAssemblies\UnityEngine.Networking.dll - - - Library\UnityAssemblies\UnityEngine.UI.dll - Library\UnityAssemblies\UnityEditor.dll @@ -75,12 +69,12 @@ Library\UnityAssemblies\UnityEditor.iOS.Extensions.Common.dll - - Assets\Plugins\Dll\Photon3Unity3D.dll - Assets\Plugins\Dll\MsgPack.dll + + Assets\Plugins\Dll\Photon3Unity3D.dll + Assets\Sandbox\PhotonWire.Sample.Share.dll diff --git a/Source/PhotonWire.UnityClient/ProjectSettings/GraphicsSettings.asset b/Source/PhotonWire.UnityClient/ProjectSettings/GraphicsSettings.asset index 8cfed31..480953f 100644 Binary files a/Source/PhotonWire.UnityClient/ProjectSettings/GraphicsSettings.asset and b/Source/PhotonWire.UnityClient/ProjectSettings/GraphicsSettings.asset differ diff --git a/Source/PhotonWire.UnityClient/ProjectSettings/ProjectSettings.asset b/Source/PhotonWire.UnityClient/ProjectSettings/ProjectSettings.asset index 063e26c..3cdf9be 100644 Binary files a/Source/PhotonWire.UnityClient/ProjectSettings/ProjectSettings.asset and b/Source/PhotonWire.UnityClient/ProjectSettings/ProjectSettings.asset differ diff --git a/Source/PhotonWire.UnityClient/ProjectSettings/ProjectVersion.txt b/Source/PhotonWire.UnityClient/ProjectSettings/ProjectVersion.txt index e583c58..43c5605 100644 --- a/Source/PhotonWire.UnityClient/ProjectSettings/ProjectVersion.txt +++ b/Source/PhotonWire.UnityClient/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 5.3.4p1 +m_EditorVersion: 5.4.0b16 m_StandardAssetsVersion: 0