Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all 8947 articles
Browse latest View live

PUN for XBOX ONE

$
0
0
Hi, I wrote an email to the photon developers in novemeber about the PUN integration with XBOX ONE.
How is the development going? Is there something ready to try?

The developers saidf that by the end of march a version would be released! Any news about that?

Thank you,

Marco

Enable Unity's Ui only for the player how triggered it

$
0
0
Hello.

I am having quite a hard time trying to find a solution to my problem.
I am trying to activate a panel with Unity's new UI, but this panel to be active only on the screen of the player who triggered it and not to the others. I am trying to use photonView.isMine but it is not behaving as it should. the problem for this is that if I trigger the panel on a view that is not mine, it shows the panel only on my view, so this is not what I need. I need the panel to be shown only on the screen of the player who triggered it.
Your help would be much appreciated.
Thanks!

ShowInfoOfPlayer.cs name taq

$
0
0
what i did is attach ShowInfoOfPlayer.cs to player
and create empty child "3d text" i change font style and size
player name taq is work

but for some reason i cant change font size or anything




what wrong ?

Unity Export to iOS Error

$
0
0
Hi,
I am trying to export the app from unity to iOS device, the build is working fine. However, when the app starts to run, the following error occurs, I am wondering if its PUN fault or my coding problem? Seems like the app starts at initialization.
Here is the Error message:
Unable to resolve pinvoke method 'Photon.SocketServer.Security.DiffieHellmanCryptoProviderNative:egCryptorCreate ()' Re-run with MONO_LOG_LEVEL=debug for more information.

I just updated my PUN free to the latest version from asset store.
Any help would be greatly appreciated.

Thanks

OnPause to be called in Android Phone

$
0
0
Hi ,

I am using Photon Unity for FPS game. Game is also for android phone. When user presses power button it goes in OnPause. I want to kick user out side the game when OnPause is called for more then 30 seconds .

Photon Unity Networking automatically enable run in background to true.
So these methods below will be called ?

void OnApplicationFocus(bool focusStatus) {

}

void OnApplicationPause(bool focusStatus) {

}

How to kick user if he is on pause for more then 30 seconds . Need Help



Regards
Unity Learner

run in backround in Android

$
0
0
Hi, Photon developer team:
I use two version of PUN.
1. android platform, version 1.17, click "home" button, photon disconnection when app run in background.
2. android platform, the latest version, click "home" button, photon connected all the time when app run in background.
problem: I want to the photon disconnect when run in background,
Is there a way to solve my problem by photon?

Thanks!

PhotonNetwork.time

$
0
0
Hello im using the PhotonNetwork.time to sync the time for all players in my room but my problem is that i want make it to minutes and seconds and the seconds should have 2 digits.

but currently the PhotonNetwork.time uses double as digit.
how can i show only 2 digits of the seconds like Time.deltatime

PUN Cloud Server + WebGL Build problem.

$
0
0
I'm having some issues connecting to the cloud server when running in WebGL build. Works just fine with standalone just not sure why it will not connect at all after i build it. I have been looking around , but i have not found much help with the cloud servers.

Any help will be much appreciated.

(I have also tried it on my website still the same issue as running it from my local machine)

High Ping and Latency Problem.

$
0
0
Hello,

Currently i am working on a project with photon network. I have only one problem. The problem is about latency and high ping. My ping is around 108 ms and more. This ping causes latency in my game. I use ;

this settings to update the rotation and the current place of my player. It works very well but i thought that network player sees last the position of my player late due to high ping. I have tried many way and i have also tried to test the demo versions of photon in the package. They also have the same ping and have the same latency. I use the photon server settings below;

and when i make changes in this setting, it seems that it doesn't affect the ping much. By the way, i live in Turkey. What can i do to decrease the ping or decrease the latency?

Weird issue: can't join to an existing room

$
0
0
I am using PUN v1.69 + Photon Cloud (JP region) and get a really weird issue as below:

I have 3 devices (A, B, C) that are being joined to a same room (TestRoom).
They are communicating to each others very well.
The issue comes with the connection lost.
======
Let A the one is loosing connection.
When A disconnected from PhotonServer, B & C are notified with OnPhotonPlayerDisconnected(). This is OK.

After that, A try to reconnect and join to the old room (TestRoom). At this time, A can not join to that room. It get a error code (32758) with message:"Game does not exist".

This is weird because B & C are still in that room and their communication is really good.
=======

I use an iPod 5, an iPhone 6+ and the unity editor to test this.

Do you guys have any suggestion for me on this case???
It took me too much of time :neutral:

Synchronizing a C# List through an RPC?

$
0
0
So I'm trying to create a basic list of Usernames that can be seen across by each user. Basically when the player joins the room, he/she is asked to type a username in an Input Field. That name then is suppose to get put inside a List where all user names will go.

It seems as though it works only on the master client. When I load the server through the Unity engine, type in a user name, and then launch a build and do the same, I see both user names inside the list. But when I load the build first, and then load the server inside the engine, It does not show the build clients (The master) username inside the list. It only shows the local user name.

Does anyone have an solutions for syncing List data across the networks? Any help is greatly appreciated.

PhotonNetwork.OnEventCall unsubscribe Event

$
0
0
We may add RaiseEvent like this:
PhotonNetwork.OnEventCall += this.OnEvent
But what way is correct for remove event? Same like this?
PhotonNetwork.OnEventCall -= this.OnEvent

PUN.Reconect (), PUN.Disconnect()

$
0
0
Hello all, I'm having trouble with network connection, reconnection and disconnect status.

1) I turned off WIFI on my machine and run Unity. I got messages that there is no internet connection. But if I turn on WIFI on my machine while Unity running I can't reconnect to Photon.

2) I turned on WiFi on my machine and run Unity. Everything is ok. But if I turn off WiFi on my machine while Unity running. It takes more than 3 minutes to get message that there is no internet connection and my machine is lags.

count of this errors are 20k:

2.1)
Connect() to '37.58.117.146' (InterNetwork) failed: System.Net.Sockets.SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in :0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in :0
at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in :0
at ExitGames.Client.Photon.SocketUdp.DnsAndConnect () [0x00000] in :0

2.2)
OnFailedToConnectToPhoton: ExceptionOnConnect
UnityEngine.Debug:LogWarning(Object)
MultiplayerConnector:OnFailedToConnectToPhoton(DisconnectCause) (at Assets/Scripts/Network/MultiplayerConnector.cs:163)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2238)
NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1320)
ExitGames.Client.Photon.<>c__DisplayClass139_0:b__0()
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)

2.3)
Can't execute Disconnect() while not connected. Nothing changed. State: PeerCreated
UnityEngine.Debug:LogWarning(Object)
NetworkingPeer:Disconnect() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:504)
PhotonNetwork:Disconnect() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1600)
Menu:OnDisconnectedFromPhoton() (at Assets/Scripts/Menu/Menu.cs:87)
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
NetworkingPeer:SendMonoMessage(PhotonNetworkingMessage, Object[]) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2238)
NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1307)
ExitGames.Client.Photon.EnetPeer:Disconnect()
ExitGames.Client.Photon.IPhotonSocket:b__40_0()
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)


I know that my code is messy. I'm missing too many things.
Can please someone help me with it?


I want pop up text message for player "Not connected to Server" if player runs the game without internet connection and if there is available internet connection (internet appears) while player still runs game. pop up message about current status and count of lobby players.

If player runs the game with internet connection and while he/she plays game and suddenly the device or machine has lost internet connection, than I want also pop up message about current status "Not connected to Server" while device or machine connects again to the internet.

I can handle with pop up messages, I can show status and count of lobby players or available rooms.

I just want example how to switch connection and disconnection with out too many error messages, because they are really a lot like I'm using Update function and my machine is lags.
I'm not using Update function.

sample codes that i have used
 if (PhotonNetwork.connectionState == ConnectionState.Connected) 
{

}

if (PhotonNetwork.connectionState == ConnectionState.Disconnected)
{

}

void OnDisconnectedFromPhoton ()
{
PhotonNetwork.Disconnect ();
PhotonNetwork.Reconnect ();
}

void OnConnectedToPhoton ()
{
PhotonNetwork.Reconnect ();
}
I need really help please

How to reject player to join to the room?

$
0
0
I use webhook PathJoin and return result:
{ 'ResultCode' : 1, 'Message' : 'Access Diened' }
{ 'ResultCode' : 5, 'Message' : 'Access Diened' }
{ 'ResultCode' : -1, 'Message' : 'Access Diened' }

This not working. Player join to room.

Photon multiplayer room make disappear in lobby when room is getting full

$
0
0

Hi all, I am making realtime multiplayer game. want to Provide on options like 1) Room#1 - with two maximum player capacity 2)Room#2 - with four maximum player capacity

If in these case if Room#1 player count (getting full) then this room name should not be visible in lobby. same as for 4 player Room#2, it should getting visible false. these room should not visible to other connected player in lobby. How can it is possible ? which photon function should i have call ? and when call ?

Thanks in advance

Duplicate Players Problem

$
0
0
Hi, I'm new to Photon, but got it working in my project by using the Photon flight combat tutorial as basis for my implementation... (flight shooter)
All the basics work fine... spawn ships, join game, shoot various weapons at each other.... But I keep getting cloned copies of player in the score list. Say 2 players join. Bob and Jim. They shoot each other.. and after a short while, the player list now shows 2 bobs and 1 Jim. Neither has left the game or re-joined.
How is this possible, what might I be doing wrong ? something to do with re-spawn maybe ?
any ideas welcome.
Cheers

Undefined symbols for architecture arm64

$
0
0
Hi everyone!
I'm currently building an app for the App Store but XCode 7.2.1 gives me 7 errors:


I need to build with a 64 bit architecture due to App Store restriction.
My PUN version is 1.66, Unity 4.6.9f1
(Android Build was flawless, just to say)

problem with PUN, can't connect to server

$
0
0
hi i download pun from asset store and then set app id in. then run demo and the games cant connect to master server. i ping the server ip and seems the server is down!!

Troubles with Photon Friends - Unity, Facebook sdk

$
0
0
Hello. I am developing a 2d multiplayer game. I am using facebook or my custom authentication. Everything is working with that. I have implemented my own friend system using playerprefs (adding, refreshing list ect..) however when I try to find friends, it always returns that they are not online, even if they are.

This is the flow for my game:

Menu > Login via facebook (set photon userid/token to the facebook information) > Load lobby level > Load friends from player prefs > FindFriends > Display information.

However when I display the information, it always says that they are offline. Am I missing something? Or do I need to do something specific because of the facebook integration? I have been stuck on this for sometime now so any help is appreciated.

After the friends are loaded from the playerpref string, this is called, and I have the friend list callback in another script that should print out some debug logs.

public void InitializeFriends()
{
if (_friendList != null)
{
string[] friends = _friendList.ToArray ();

PhotonNetwork.FindFriends (friends);
Debug.Log ("Tryna find friends");
}
}


void OnUpdatedFriendList()
{
Debug.Log ("OnUpdatedFriendList");
if (PhotonNetwork.Friends != null)
{
foreach (FriendInfo friend in PhotonNetwork.Friends)
{
Debug.Log ("Friend name: " + friend.Name + " Online: " + friend.IsOnline);
}
}
}

What im wondering is, why is it saying that the friends are offline even when they're online?
All of this is called once... Is FindFriends supposed to be called more then once? How can i properly setup/design this so it works efficiently.

Best Practice

$
0
0
is it better to sync one large Component, or many smaller ones?
Viewing all 8947 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>