etdofresh / fishyeos Goto Github PK
View Code? Open in Web Editor NEWA FishNet Transport Library for Unity FishNet.
License: MIT License
A FishNet Transport Library for Unity FishNet.
License: MIT License
This should likely be
return client.RemoteUserId.ToString();
It should also allow the local host client to call without getting an exception. If you do NetworkObject.Owner
on something that the host client owns, that function will give an exception since the local host client is not in the _clients
list.
This isn't related to your plugin - it works fine
It is your instruction on importing EOS!
Not only should you transfer the "Assets/Plugins/ directory completely over
But you must also trasnfer "etc/" directory over!
Notice the "etc" directory is located at the ROOT level (meaning, it is a sibling of the Assets directory)
Thanks! :)
when the host lost connection disconnect callback never fire
also when host disconnect it should switch host to next client instead of dropping all clients out
I updated from an old version of EOS and FishyEOS, and with the new version I can't connect. When I try to connect I get this on the client:
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0343058-08:00 LogEOSP2P(Verbose): Using Port Range 7777-7876 for P2P traffic
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0343058-08:00 LogEOSP2P(Verbose): InitializeP2PNetwork - Initialized
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0343058-08:00 LogEOSP2P(Verbose): Using Port Range 7777-7876 for P2P traffic
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0353062-08:00 LogEOSP2P(Info): Requesting new TURN relay credentials for 000...21e.
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0408189-08:00 LogEOSP2P(Info): A new connection established listener has been bound. LocalUserId=[000...21e] SocketId=[84696398]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0418165-08:00 LogEOSP2P(Info): A new connection closed listener has been bound. LocalUserId=[000...21e] SocketId=[84696398]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0418165-08:00 LogEOSP2P(Info): Added new peer. LocalUserId=[000...21e] RemoteUserId=[000...be0]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0418165-08:00 LogEOSP2P(Verbose): Queuing signaling message for peer while waiting for turn credentials to be ready. LocalUserId=[000...21e] RemoteUserId=[000...be0] SessionGuid=[KlqowuQjmEab_0_AfNPPEg] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[0/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0418165-08:00 LogEOSP2P(Info): Accepted a connection with a peer. LocalUserId=[000...21e] RemoteUserId=[000...be0], SocketId=[84696398]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0428166-08:00 LogEOSP2P(Info): Starting NAT Detection
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.0468194-08:00 LogEOSP2P(Verbose): Sending queued signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:42.1416853-08:00 LogEOSP2P(Verbose): Applying updated RTC Configuration
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:46.2106713-08:00 LogEOSP2P(Info): NAT Type was Non-Symmetric
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:47.0500486-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[2/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:52.1165200-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[3/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:37:57.1183872-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[4/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:02.1199257-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[5/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:07.1218967-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[6/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:12.1222924-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[7/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:17.1233202-08:00 LogEOSP2P(Verbose): Resending signaling message for peer. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[8/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:17.1233202-08:00 LogEOSP2P(Warning): Reached maximum send attempts for signal message, will not try further. LocalUserId=[000...21e] RemoteUserId=[000...be0] MessageId=[0] Type=[com.epicgames.p2p.request_connection] SentTimes=[8/8]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0456879-08:00 LogEOSP2P(Warning): Removing connection that has timed out. LocalUserId=[000...21e] RemoteUserId=[000...be0] SocketId=[84696398] SessionGuid=[KlqowuQjmEab_0_AfNPPEg]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0456879-08:00 LogEOSP2P(Info): Removed peer with no connections. LocalUserId=[000...21e] RemoteUserId=[000...be0]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0456879-08:00 LogEOSP2P(Info): Connection closed. LocalUserId=[000...21e] RemoteUserId=[000...be0] SocketId=[84696398] Reason=[TimedOut]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0456879-08:00 LogEOSP2P(Verbose): Removing queued packets to/from remote user due connection closing. RemoteUserId=[000...be0] SocketId=[84696398]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0493002-08:00 LogEOSP2P(Info): Successfully closed last connection establish listener for this socket. SocketId=[84696398] NotificationId=[58]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0503011-08:00 LogEOSP2P(Info): Successfully closed last connection closed listener for this socket. LocalUserId=[000...21e] SocketId=[84696398] NotificationId=[59]
[EOS] [Debug.bindings] [None] [EOS] 2024-03-05T10:38:27.0512947-08:00 LogEOSP2P(Verbose): There were no connections with a peer to close. LocalUserId=[000...21e] RemoteUserId=[000...be0] SocketId=[84696398]
I'm not sure if maybe something needed to be changed with the new EOS SDK 1.16 that the PlayEveryWare plugin has moved to?
I found this on the EOS website, which looks like it could be related, but the proposed fix there didn't do anything:
https://eoshelp.epicgames.com/s/article/Why-are-P2P-connections-failing-with-Dropping-peer-session-signal-message-from-unknown-peer?language=en_US
Trying to build for Android and get this error.
public static PlatformInterface GetPlatformInterface()
{
if (_createdOrGotPlatformInterface) return EOSManager.Instance?.GetEOSPlatformInterface();
GetManager();
_createdOrGotPlatformInterface = true;
if (PlatformInterface != null) return PlatformInterface;
var gameObject = new GameObject("EOSManager");
UnityEngine.Object.DontDestroyOnLoad(gameObject);
_eosManager = gameObject.AddComponent<EOSManager>();
#if !UNITY_EDITOR && !(UNITY_STANDALONE_WIN)
EOSManager.Instance?.Init(_eosManager, EOSManager.ConfigFileName);
#endif
return PlatformInterface;
}
Is this line actually relevant anymore?
EOSManager does this in its Init:
public void Init(IEOSCoroutineOwner coroutineOwner)
{
#if !UNITY_EDITOR && !(UNITY_STANDALONE_WIN) && !UNITY_ANDROID && !UNITY_IPHONE && !UNITY_WSA
#warning Platform not supported
UnityEngine.Debug.LogError("Platform not supported");
#endif
Init(coroutineOwner, EOSPackageInfo.ConfigFileName);
}
Looks like its safe to just remove this directive?: Or should it be modified to reference: EOSPackageInfo
#if !UNITY_EDITOR && !(UNITY_STANDALONE_WIN)
EOSManager.Instance?.Init(_eosManager, EOSManager.ConfigFileName);
#endif
.
here's the full stack trace: NullReferenceException: Object reference not set to an instance of an object FishNet.Transporting.FishyEOSPlugin.ServerPeer.GetConnectionAddress (System.Int32 connectionId) (at Library/PackageCache/com.etdofresh.fishyeos@6a4e06b9b6/Core/ServerPeer.cs:481) FishNet.Transporting.FishyEOSPlugin.FishyEOS.GetConnectionAddress (System.Int32 connectionId) (at Library/PackageCache/com.etdofresh.fishyeos@6a4e06b9b6/FishyEOS.cs:139) FishNet.Connection.NetworkConnection.ToString () (at Assets/FishNet/Runtime/Connection/NetworkConnection.cs:231) System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <c2a97e0383e8404c9fc0ae19d58f57f1>:0) System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) (at <c2a97e0383e8404c9fc0ae19d58f57f1>:0) System.String.Format (System.String format, System.Object arg0) (at <c2a97e0383e8404c9fc0ae19d58f57f1>:0) globalGameManager.onClientStateChanged (FishNet.Connection.NetworkConnection conn, FishNet.Transporting.RemoteConnectionStateArgs args) (at Assets/gameAssets/multiplayerAssets/fishNetScript/gameManager/globalGameManager.cs:467) FishNet.Managing.Server.ServerManager.Transport_OnRemoteConnectionState (FishNet.Transporting.RemoteConnectionStateArgs args) (at Assets/FishNet/Runtime/Managing/Server/ServerManager.cs:550) FishNet.Transporting.FishyEOSPlugin.FishyEOS.HandleRemoteConnectionState (FishNet.Transporting.RemoteConnectionStateArgs connectionStateArgs) (at Library/PackageCache/com.etdofresh.fishyeos@6a4e06b9b6/FishyEOS.cs:202) FishNet.Transporting.FishyEOSPlugin.ServerPeer.OnPeerConnectionClosed (Epic.OnlineServices.P2P.OnRemoteConnectionClosedInfo& data) (at Library/PackageCache/com.etdofresh.fishyeos@6a4e06b9b6/Core/ServerPeer.cs:232) Epic.OnlineServices.P2P.P2PInterface.OnRemoteConnectionClosedCallbackInternalImplementation (Epic.OnlineServices.P2P.OnRemoteConnectionClosedInfoInternal& data) (at Library/PackageCache/com.playeveryware.eos@df7dc4a38cb8/Runtime/EOS_SDK/Generated/P2P/P2PInterface.cs:793) (wrapper native-to-managed) Epic.OnlineServices.P2P.P2PInterface.OnRemoteConnectionClosedCallbackInternalImplementation(Epic.OnlineServices.P2P.OnRemoteConnectionClosedInfoInternal&) Epic.OnlineServices.Platform.PlatformInterface.Tick () (at Library/PackageCache/com.playeveryware.eos@df7dc4a38cb8/Runtime/EOS_SDK/Generated/Platform/PlatformInterface.cs:944) PlayEveryWare.EpicOnlineServices.EOSManager+EOSSingleton.Tick () (at Library/PackageCache/com.playeveryware.eos@df7dc4a38cb8/Runtime/Core/EOSManager.cs:1458) PlayEveryWare.EpicOnlineServices.EOSManager.Update () (at Library/PackageCache/com.playeveryware.eos@df7dc4a38cb8/Runtime/Core/EOSManager.cs:1729)
will need this to be fixed ASAP since im gonna use it in production
Can support Steam Login using External Auth, Steam Session Ticket?
Auth Login ExternalType is fixed ExternalCredentialType.Epic
I'm struggling to figure out a good way to learn what to do. I looked at the samples for the EOS Plugin, but is there any way to do the same thing with FishyEOS? Or is using the EOS Plugin directly the way to go?
Hi ETdoFresh,
Thanks for creating FishyEOS. I'm excited to jump in and get started using it.
I just installed this into a new project and when I get through installing FishNet, EOS Plugin and configuring it, then adding FishyEOS I get these errors:
Library\PackageCache\com.etdofresh.fishyeos@c94679d\Core\CommonPeer.cs(145,21): error CS1620: Argument 2 must be passed with the 'ref' keyword
Library\PackageCache\com.etdofresh.fishyeos@c94679d\Core\CommonPeer.cs(145,39): error CS1620: Argument 3 must be passed with the 'ref' keyword
Digging into the code a bit I can see that on line 145 it is calling the function EOS.GetCachedP2PInterface().ReceivePacket but it seems that it doesn't match the parameters required by the ReceievePacket function. It might have been updated recently in the newer version of EOS but I haven't dug into the release notes to find out if that is the case. As a workaround, I updated that line of the code to be:
SocketId socketId = new SocketId();
var receivePacketResult = EOS.GetCachedP2PInterface().ReceivePacket(ref receivePacketOptions, ref remoteUserId, ref socketId, out var channelByte, data, out _);
which resolved the errors for now but I did want to bring it to your attention just in case.
I've been trying to get fishyEOS to work on android the last few days and have had no success
I set up a brand new projects and did the following steps:
Create a new project using Unity 2021.3.16f1
Downloaded FishNet 3.0.0 Pro
Cloned git clone https://github.com/PlayEveryWare/eos_plugin_for_unity and copied Assets/Plugins into Assets/Plugins
Installed com.unity.editorcoroutines
Also installed com.unity.mobile.android-logcat
Configured the plugin
Openeed FishNet/Example/All/Prediction/CharacterControllerPrediction/CharacterController.Unity
Replaced the transport with FishyEOS
Added this scene to build settings so this is the first scene loaded
Verified this worked in the Unity editor
Followed the instructions for Non-Windows support
https://github.com/FirstGearGames/FishyEOS
My Android logcat logs when clicking host are as follows
While attempting to connect as a client I get the following error:
LogEOSConnect(Error): Invalid parameter EOS_Connect_LoginOptions.UserLoginInfo reason: cannot be set
I have no problems starting a server, but trying to start client for connecting to another peer provides the above?
Other than setting the "Remove Server Product User Id" is there anything else that needs to be configured?
I don't quite understand the purpose of the "Auto Authenticate" and "Auth Connect Data" as the Auth Connect Data cannot be set in code?
When one client disconnects, EOS_P2P_OnRemoteConnectionClosedCallback
is being called in the server for every client that is connected, causing all of the clients to drop.
Here's the connection IDs when players join:
[ServerPeer] Established connection from 0002034f5dc441a6a59dae649d70b514 with handle #Epic.OnlineServices.P2P.SocketId and connection id 1.
[ServerPeer] Established connection from 0002861039944cff8d32791f02b1a585 with handle #Epic.OnlineServices.P2P.SocketId and connection id 2.
[ServerPeer] Established connection from 0002429a57204fe2aa2391d29dc3a5ce with handle #Epic.OnlineServices.P2P.SocketId and connection id 3.
And here is what happens when a single client leaves:
[ServerPeer] Closed connection from 0002861039944cff8d32791f02b1a585 with handle #Epic.OnlineServices.P2P.SocketId and connection id 1.
[ServerPeer] Closed connection from 0002861039944cff8d32791f02b1a585 with handle #Epic.OnlineServices.P2P.SocketId and connection id 2.
[ServerPeer] Closed connection from 0002861039944cff8d32791f02b1a585 with handle #Epic.OnlineServices.P2P.SocketId and connection id 3.
I'm still trying to figure out if this is a problem in FishyEOS, playeverwhere's plugin, the way our lobby is connected or if it's in EOS itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.