Questions tagged [photon-pun]

57 questions
0
votes
0 answers

How to Instantiate a Rigidbody in Photon

I'm trying to instantiate a knife in my multiplayer game (using Photon). I need it to be a rigidbody, as I change its velocity and need gravity. Here's what I currently have (only error is 0039, opposed to 0029) Rigidbody knifeInstance; …
0
votes
1 answer

I keep getting an error on RPC's in photon

using Photon.Pun; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayAnimation : MonoBehaviour { [SerializeField] private Animator animator; [SerializeField] private string nuke = "nuke"; …
0
votes
0 answers

How to pass the function to all players if the call condition is fulfilled by one player

When entering the server, the player calls the RPC function that increases the number of players, it works correctly. Another RPC function is responsible for the player's death, but it changes the variable only for one client, the value does not…
0
votes
0 answers

How to make a common variable for all players. Photon

I need a variable responsible for the number of live players, when a player connects to a room, it increases by 1, when he dies, it decreases. I tried using RPC and stream, but nothing worked.
TGRQQ
  • 1
0
votes
0 answers

Bool value not Syncing across network using onPhotonSerializeView

My bool value changes to true when it enters a trigger, I want to sync this change across the network. Another script attached to a gameobject detects the change and prints to the console. I used these scripts but the change isn't reflecting across…
laos
  • 1
0
votes
0 answers

How to instantiate two different Charaters using Photon Unity 3D

I am making Third person multiplayer game with unity and Photon i can't get the Instantiating of players right both players are sometimes instantiating the same avatar or sometimes there camera Mix up. I have used Cinemachine Virtual camera and…
0
votes
0 answers

input of inputfield in unity becomes null when executed for pun2

basically, I am trying to display input of inputfield on the instantiated photon object using photon.rpc . However, input of inputfield does not even write anything on the console. Here is my solution //…
W 3
  • 19
  • 2
0
votes
0 answers

Create a lobby room and join to that room in unity using photon pun

Here is my code: using UnityEngine; using Photon.Pun; using TMPro; using UnityEngine.UI; using Photon.Realtime; public class RoomController : MonoBehaviourPunCallbacks { public TextMeshProUGUI createRoomField; public TMP_InputField…
kove kove
  • 1
  • 1
0
votes
0 answers

Unable to connect to PhotonNetwork in a embedded iOS app after Unity was closed via unityFramework.unloadApplication() once

I have a iOS App created with React-Native that includes a Unity app that may be opened and closed several times during the use of the React-Native app. The Unity app has a Photon Pun. All works very well the first time we open the Unity app. But…
romixch
  • 580
  • 4
  • 12
0
votes
0 answers

Unity: Photon NullReferenceException: Object reference not set to an instance of an object

I'm new with Unity and Photon. I'm developing a game for my school assignment. When I run my game 2 times at the same time. I got this errors. One of players' objects references are none. First one is matching but second one is not matching and…
0
votes
0 answers

Unity WebGL build lagging on Chrome (MacOS)

I built a multiplayer game using Photon PUN 2 and Unity 2021.3.12. I have tested the game builds on various devices and operating systems as well various browsers and following are the results: PC & Mac Standalone Builds - works completely fine…
0
votes
1 answer

How can I sync local movement to Photon Network in Unity?

im making a multiplayer FPS game, and I have pretty much all the networking done and working. The issue is, that photon is syncing to players local movement, but if u have a bad connection, you could not tell it is happening cause player send late…
0
votes
1 answer

Setting tags on a Unity GameObject with Photon

I am trying to tag two PUN instantiated game objects with "Player1" and "Player2" tags by looking at their PhotonView ViewIDs through an RPC call. I am able to successfully tag the player 1 game object with the player 1 tag, however, no matter what…
0
votes
0 answers

Using Photon.How to give player turn so he can interact with those 5 buttons in the screen and off in other player screen?

Can anyone Solve this? Each player's screen should have a 2D square, and a selection of colours at the bottom During a player's turn, they select a colour which will change the colour of the square on the screens of both the players. this is very…
0
votes
1 answer

How to make multiplayer players not damage themselves?

So, I'm using Photon Pun 2 to make a basic multiplayer combat game. When the game starts, two player prefabs are instantiated, one for each player. Each prefab's hand has a "PlayerHand" tag and when the enemy's hand hits the player, the player…
AK200122
  • 11
  • 1