Skip to main content

Questions tagged [photon]

Photon is networking and multiplayer middleware.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

How to update a component field for a single player for all player views?

I'm making a 2 player game in which, when 2 players are in a room, they "toss a coin" to decide which of the two player "skins" they get. Now, the way I built the player "...
Kaiannae's user avatar
  • 113
0 votes
0 answers
32 views

How can I change the default UI shown by Photon Fusion?

When I start a Photon Fusion game, I see by default the following dialog box: I want to change it, e.g. by removing some options, adding color or text, etc. I searched for "photon fusion lobby&...
Erel Segal-Halevi's user avatar
0 votes
0 answers
30 views

Do I need to query HasStateAuthority?

Following a Photon Fusion tutorial, I wrote this code: ...
Erel Segal-Halevi's user avatar
0 votes
0 answers
49 views

Transfer ownership from one user to another not working in Unity / Photon

I'm having trouble transfering ownership from one user to another in Unity Photon. Basically one user who owns the object picks it up (enters isMine), then the ...
 d_test_2030's user avatar
0 votes
0 answers
54 views

Second player gets stuck while joining

I get this error message on the console whenever I try to make the second player join. Failed to find a PhotonView with ID=2 ...
zaboombafoo's user avatar
0 votes
1 answer
44 views

Game object ownership not transferring and getting destroyed with the master client

I'm using photon pun. I have a spawner script which instantiates the eatables in the gameplay and right after the instantiation, im transferring its ownership to null. The instantiated game objects's ...
zaboombafoo's user avatar
0 votes
0 answers
72 views

How to synchronize pausing and unpausing game using Photon Unity Networking (PUN)

I need some help figuring out how to synch pausing and unpausing the game to other players. I have a UI button where players can pause using the code I have posted below. Pausing works fine with all ...
Ryan Cat's user avatar
0 votes
0 answers
29 views

How to update other players after adding a character to the text UI

Hello I'm new to multiplayer development and I'm using photon pun 2 in Unity engine C# language. How can I update other players every-time I add another character to my text UI. The characters that ...
Ryan Cat's user avatar
0 votes
1 answer
277 views

Networking issue with photon, Joined room success but other player not seen

I am trying to add networking to my game via Photon Realtime and have a unity scene set up with this script attached to one of my game objects : ...
Doug Ray's user avatar
  • 143
0 votes
0 answers
68 views

Error assigning value to object instantiated by Photon Pun?

I instantiate an object using the following line: obj_player = PhotonNetwork.Instantiate(prefab_obj_player.name, transform.position, Quaternion.identity); Right ...
Boneco Sinforoso's user avatar
0 votes
1 answer
309 views

Empty room list on region change

I am using PUN2 for my game and I am using the OnRoomListUpdate() function to sync my UI with the rooms that are available to players when they are in the lobby. ...
sabo's user avatar
  • 237
0 votes
1 answer
3k views

Get count of players in room by room name

I'm trying to make a multiplayer game where there are multiple levels. All these levels will have different rooms, each with a max player count of 4. Basically, player selects a level check if there ...
twilightstar's user avatar
1 vote
1 answer
703 views

Why am I disconnecting from Photon Chat immediately after Connecting?

Hi I am experiencing a rather weird problem wherein which I am disconnecting from Photon Chat immediately after I am connecting to it. Here is the code I am using for Photon Chat. ...
chethanv77777's user avatar
0 votes
0 answers
274 views

How to fix "Operation FindFriends (222) not called because client is not connected or not ready yet, client state: PeerCreated." in Photon

So here I am trying to add a Player as a friend to myself. I am following a tutorial for the same So I am using the PlayFab to update the friend List. When the update is successful onFriendListSuccess(...
chethanv77777's user avatar
1 vote
1 answer
2k views

Creating a room with custom options that persist to other players

I am using Photon for networking in my project. I am creating a room with PhotonNetwork.CreateRoom(). I pass in the room name as well as a set of room options where the room options just specify the ...
sabo's user avatar
  • 237
0 votes
2 answers
55 views

regarding about game servers performance and security

I have two options to implement should my game server access the database directly should game server access database via api would it be necessary to abstract the calls via api even though its ...
DDD's user avatar
  • 1
0 votes
0 answers
38 views

game button animation lag with Photon

Friends, I am making games using photon. But I could not do the delay animation as described in this link. The action appears to be late on the player according to the ping. Can you give an ideas ...
Kamran's user avatar
  • 1
0 votes
1 answer
856 views

Photon Transforms syncing other transforms

I have a problem wherein this happens: It's problematic because I'm unfamiliar how to set the same player value in the same transform over the network. Is there a way where if I get the list of ...
CraftedGaming's user avatar
0 votes
0 answers
452 views

Automatic Disconnecting of Players and The game is kinda Lag in PUN 2

I am creating a 3d game application in unity with the use of PUN2. When I start the game, all players automatically disconnected and the animation of players is kinda lag or not synchronizing towards ...
Lacus clyne's user avatar
0 votes
0 answers
51 views

I can not proceed to my room menu using photon in unity when i use PhotonNetwork.JoinRoom()

I have a TextMeshProUGUI called EnterRoomName and I am trying to enter the name of the room that I'm supposed to enter, but it's not working. This is my function: <...
Lacus clyne's user avatar
0 votes
0 answers
25 views

Overridden movement function doesn't work

I moved from C to C# so I am a novice in Object Oriented Programming. I wanted to implement OOP in my character movement, but it didn't work the way I expected. My character is instantiated when the ...
Gorlomi's user avatar
0 votes
0 answers
51 views

Photon2 billboards take a long time to face the camera

I'm using PUN2 and trying to use nametag billboards for my players, but they are not facing forward correctly and I have to wait more than 20 seconds to make the name tag of player return to facing ...
Lacus clyne's user avatar
0 votes
2 answers
2k views

How to load additive scenes to the master client, per player, in unity using photon?

I have already successfully created a multiplayer scene where multiple users can join, however there are some issues like unity not allowing multiple sound listeners per scene. In order to alleviate ...
EmperiumIce's user avatar
1 vote
1 answer
61 views

Photon Realtime, StripKeysWithNullValues cause heavy GC Alloc

In our current project, we use Photon room properties to sync entities. and i noticed some heavy GC Allocs while deep profiling the game and it always ends down to this method. Have anyone faced this ...
Omar Guendeli's user avatar
0 votes
2 answers
1k views

Getting user id from one scene then to the next scene

I'm new to multiplayer and photon so pardon me if this question is somewhat frequent. I have successfully set up my project to start from a main menu - waiting room - actual gameplay scene. However I ...
Ho-Jeong Lee's user avatar
0 votes
0 answers
440 views

Cost of Unity Local Multiplayer VS Unity Online Multiplayer

I know that making multiplayer games in Unity costs money because of the servers that are used in connecting the players. So basically its free upto 20 CCU and then it increases as per the CCU. Its ...
Sarvagna Shukla's user avatar
1 vote
1 answer
72 views

Could use some help figuring out bouncy physics material in this PhotonEngine game

So I'm trying to prototype a primitive 1v1 fighting game where the goal is to push the opponent off of the platform rather than actually fight. This is working great in a local multiplayer setup using ...
LogicaLInsanity's user avatar
0 votes
0 answers
402 views

Unity network player synchronization issues with HingeJoint(s)

I have a vehicle with custom wheels which are connected to it by the HingeJoint components. Everything works perfectly when using this car in single-player mode. Wheels are actually as ...
Serg's user avatar
  • 383
0 votes
1 answer
498 views

Photon2 Unity2D How to send float with RPC

I have big problem in my code .. I want to spawn obstacle exactly on the same position as on the server is spawned so I made rpc Method and tried to pass random variable of float , but when i run the ...
Simple aPPS's user avatar
0 votes
0 answers
913 views

Photon-Unity Instantiation not working

I use Unity and Photon for the multiplayer. I Instantiate my gameObjects using this method : ...
GameDevF7's user avatar
2 votes
0 answers
308 views

How to make an authoritative multiplayer game deterministic for all clients? [closed]

I'm starting to create a multiplayer online game, with an authoritative server. As it is, the clients send inputs to the server which do the simulation and then send back to clients the updated state. ...
Roberto Gomes's user avatar
0 votes
0 answers
208 views

Unity Photon multiplayer :: check distance between two players

How to get distance between two player in a photon multiplayer game. Condition is both the player is moving. I have tried something like this, in my player control script: ...
Arijit's user avatar
  • 101
0 votes
1 answer
1k views

In Photon, What happens networked GameObject's ownership when master client disconnects?

I'm creating multiplayer game with Photon. When player disconnects, especially master client does, every GameObject instantiated from Master client is gone, so I can prevent with this: ...
modernator's user avatar
  • 1,213
0 votes
1 answer
2k views

Photon disconnected without any error/warning message

I'm making online game with Photon and Unity. It was working fine, but suddenly players are disconnected without any warning or errors. It just happens sometimes fast, sometimes slow, but always ...
modernator's user avatar
  • 1,213
1 vote
2 answers
2k views

synchronized transform is always 0,0,0 in Photon unity

I'm making a simple zombie co-op game with Unity and Photon and have problem with sync enemy transform. First, I need to explain my idea of chasing enemy AI. Enemies are using NavMeshAgent to finding ...
modernator's user avatar
  • 1,213
0 votes
1 answer
948 views

How can I get fastest region server in Photon C++ Client API?

I am facing problem with my online multiplayer board game. It takes long time to create and join room. Also sometimes other player doesn't get the data. After searching all over the Photon C++ code I ...
videogamechef's user avatar
1 vote
1 answer
795 views

InvalidCastException when instantiating a prefab on the network using Photon

As stated in the title, I get this error when I try to instantiate a game object using Photon: InvalidCastException: Cannot cast from source type to destination type. NetworkingPeer.DoInstantiate (...
Fanis Deligiannis's user avatar
1 vote
0 answers
64 views

Best way to connect and save data in an online Android game [closed]

I'm new here, I'm in need of a help as it would be the most ideal way to proceed with my project. The project is very simple, a basic online rpg for android in specific (in the future can be migrated ...
Ownims's user avatar
  • 11
0 votes
1 answer
456 views

Synchronization between server's value and the one showed in a stat bar (health, stamina, mana...)

I am trying to implement a stamina system for my mmo. In few words, I computed everything on the server that then notifies the client. On the client I have a stamina bar that shows the stamina amount. ...
Alakanu's user avatar
  • 705
0 votes
0 answers
371 views

Unity3D and Photon Networking RPG

Good time of the day. My question might sound stupid, due to the knowledge you might have, but here it is. I've purchased Diablo 3 a long time ago and been enjoying it since then. Since many of my ...
darki73's user avatar
  • 156
0 votes
1 answer
277 views

How to share some elements of array with different players on Photon in the same Room? Unity3d

I want to assign cards to different players in the room. I've a Class "Cards" that contains an array of 52 cards like this: "2_of_spades","3_of_spades"....... and so on. All i want is to assign random ...
Faizan Khan's user avatar
2 votes
1 answer
1k views

Server logic on client side?

I am very confused by the PUN implementation of the Photon networking engine. It looks like I don't have to write a separate server so I'm very curious how this works. I have done quite some KryoNet ...
Madmenyo's user avatar
  • 1,979
1 vote
1 answer
723 views

Photon Unity Network with Socket IO Ambiguities

When trying to use Socket.IO along with PUN I get multiple errors similar to the one below: ...
Vishal Mohan's user avatar
0 votes
1 answer
2k views

Unity3D: Photon syncing physics events

I'm making a billiard game and I wanna implement multiplayer in it. Since updating the movement in every frame is inefficient and laggy, I thought I could remake the events in game happen in all ...
Ssiro's user avatar
  • 85
1 vote
2 answers
3k views

Not able to connect to Photon(PUN).photon unity networking error

I'm new to photon Networking. My game was working great suddenly this is appearing Cannot send messages when not connected. Either connect to Photon OR use offline mode! UnityEngine.Debug:LogError(...
Saranya Ananthakrishnan's user avatar
1 vote
1 answer
211 views

What's wrong with my food generating code?

This script is intended to produce amount of (food) objects for the players over the network. What should happen is that when a player eats one food, another food object gets created in another random ...
Abanoub Wahied's user avatar
1 vote
1 answer
161 views

How to manage this problem in a multiplayer client-server game with Photon ?

Good day. I'm developing my first simple game, a racing car, using Unity and Photon. In my game there are a function that generate random Bonus on random position each (for instance) 5 seconds. ...
stighy's user avatar
  • 437
1 vote
0 answers
281 views

What i'm missing in this multiplayer Unity / photon code?

i'm having some troubles in my first, simple, multiplayer racing game, using Photon and Unity. Following classic photon tutorial i've written the code below, but, it won't work properly. In ...
stighy's user avatar
  • 437
2 votes
1 answer
3k views

How to sync new object (weapons/bullet) in a multiplayer photon game ?

I'm using Photon to develop a multiplayer game. I would like to know the best way to synchronize "weapons" bullets object between network players. Thanks
stighy's user avatar
  • 437
1 vote
1 answer
1k views

Communication between Photon Cloud game and web server

I am creating a multiplayer game using Photon Cloud (Photon Unity Network). For storage of player data (profile, inventory, achievments) I use web server (asp.net mvc & sql server). How to ...
Rusildo's user avatar
  • 103