Hello,
I have a problem with my component Photon Animator View.
I set all my Synchronize parametrers to Continuous for a test. But when i run my game and I check on my character localCharacter the value of each variable in the inspector. Some of them change to become Disabled and other Discrete.
But if on my loval Character I check the other player For him no variable change.
I have no script interacting with PhotonAnimator View.
I set this component as last because they is some Triggers.
And I put This component in my PhotonView Component.
This problem is only when i connect another player , if I'm playing only with my local player there is no change.
Regards
Thibault Coutaz
↧
Photon Animator View Value Change
↧
about number photon cloud apps
Hello.
I have created 2 apps in PUN with 20 CCUs (free)
My question is this:
- How many apps of this type (free PUN) can be created?
- If my game is not going to have more than 20 participants per category ... would it be allowed to create 15 apps of this type and have users access your "app" by code according to that category?
Thanks.
I have created 2 apps in PUN with 20 CCUs (free)
My question is this:
- How many apps of this type (free PUN) can be created?
- If my game is not going to have more than 20 participants per category ... would it be allowed to create 15 apps of this type and have users access your "app" by code according to that category?
Thanks.
↧
↧
developing RTS with a lot of units. how many photontransformview can handle?
Hi fellow photonians,
I have been using photon for my previous games. however for my next game, im thinking about developing an RTS game with a lot of units like starcraft (200 units / player) which could stack up to 1600 units for 8 player matches.
So my question is, how many photontransformview to track unit location can photon PUN handle? anyone ever tested it out?
I have been using photon for my previous games. however for my next game, im thinking about developing an RTS game with a lot of units like starcraft (200 units / player) which could stack up to 1600 units for 8 player matches.
So my question is, how many photontransformview to track unit location can photon PUN handle? anyone ever tested it out?
↧
what role does photon play with playfab?
both seam to have match making and can work without each other.
↧
Photon no longer works after updating project version to Unity 2020
Hello, I have a unity project that uses Photon which worked perfectly fine on Unity 2019 but then when I updated the project to use Unity 2020, it just broke and cant interact with any buttons due to this error:
Operation LeaveLobby (228) not called because client is not connected or not ready yet, client state: ConnectedToMasterServer
No clue what happened at all.
Operation LeaveLobby (228) not called because client is not connected or not ready yet, client state: ConnectedToMasterServer
No clue what happened at all.
↧
↧
RPC function throws out NullReferenceException error
I'm trying to execute a simple void on all clients and I use RPC for that.
I want to execute this line of code: myPView.RPC("RPC_UpdateTaskBar", RpcTarget.All);
This should update an UI Slider for all players, but It throws out the error in the title.
The function itself looks like this:
[PunRPC]
public void RPC_UpdateTaskBar()
{
Debug.LogError("UpdateTaskBar got called");
taskBar.SetTaskBar(TasksDone);
}
I have a photon view attached to this component and I have also executed some other functions the same way in this script and it worked perfectly fine.
My question is, if there is anything wrong with this code, because maybe this does not work with a UI or something.
Notes (if that helps):
- this function gets called in another RPC function (this function was only targeted for the master client)
- myPView is the PhotonView that is attached to my game object
Thanks in advance
Max
I want to execute this line of code: myPView.RPC("RPC_UpdateTaskBar", RpcTarget.All);
This should update an UI Slider for all players, but It throws out the error in the title.
The function itself looks like this:
[PunRPC]
public void RPC_UpdateTaskBar()
{
Debug.LogError("UpdateTaskBar got called");
taskBar.SetTaskBar(TasksDone);
}
I have a photon view attached to this component and I have also executed some other functions the same way in this script and it worked perfectly fine.
My question is, if there is anything wrong with this code, because maybe this does not work with a UI or something.
Notes (if that helps):
- this function gets called in another RPC function (this function was only targeted for the master client)
- myPView is the PhotonView that is attached to my game object
Thanks in advance
Max
↧
playmaker photon proxy is missing in the scene
Hey Everyone,
I'm new to photon and need some help with a game I'm working on. I set " playmaker photon proxy" in my scene for instantiate GOs. but when I run a game I have an error that's told me " playmaker photon proxy" is missing in the scene. that simple error engages me for days and I have no solution.
when I call RPC to create GO on other FSM, this Error happened. I have " playmaker photon proxy" in the "don't destroy on the load" part but I think FSMs cant found this. at first, I can instantiate player in the scene but for bullet and other GOs, told me: " playmaker photon proxy" is missing in the scene.
https://hutonggames.com/playmakerforum/index.php?action=dlattach;topic=24026.0;attach=17246;image
I'm new to photon and need some help with a game I'm working on. I set " playmaker photon proxy" in my scene for instantiate GOs. but when I run a game I have an error that's told me " playmaker photon proxy" is missing in the scene. that simple error engages me for days and I have no solution.
when I call RPC to create GO on other FSM, this Error happened. I have " playmaker photon proxy" in the "don't destroy on the load" part but I think FSMs cant found this. at first, I can instantiate player in the scene but for bullet and other GOs, told me: " playmaker photon proxy" is missing in the scene.
https://hutonggames.com/playmakerforum/index.php?action=dlattach;topic=24026.0;attach=17246;image
↧
Limiting MasterClient's Control over scene characters.
So i have this very tricky situation i dont know yet how to solve:
I have 5 characters in a "lobby" scene (i assume they are owned by the scene by default, hence the master client also owns them). Each time a new player enter the session they should grab the control of the first "free" character in the scene. The problem starts when all the characters respond to the "pv.IsMine" of the masterclient, so in the end they all end up being controlled by the masterclient when he create the room.
The wanted behaviour that i seek is for all players (including the masterclient) to NOT control nor own any of the characters in the scene, but to give explicit control and ownership just over one character (including the character that the masterclient would control).
All the existing code for the characters movement and logic had been previously written using the "pv.isMine" approach to filter the inputs and the functions.
One solution that is NOT what we want is for the character to be spawned when the player connects, since one of the features of the game is to witness the characters already in the scene being "possessed" by the incoming players.
Any ideas?
I have 5 characters in a "lobby" scene (i assume they are owned by the scene by default, hence the master client also owns them). Each time a new player enter the session they should grab the control of the first "free" character in the scene. The problem starts when all the characters respond to the "pv.IsMine" of the masterclient, so in the end they all end up being controlled by the masterclient when he create the room.
The wanted behaviour that i seek is for all players (including the masterclient) to NOT control nor own any of the characters in the scene, but to give explicit control and ownership just over one character (including the character that the masterclient would control).
All the existing code for the characters movement and logic had been previously written using the "pv.isMine" approach to filter the inputs and the functions.
One solution that is NOT what we want is for the character to be spawned when the player connects, since one of the features of the game is to witness the characters already in the scene being "possessed" by the incoming players.
Any ideas?
↧
Unity opens Visual Studio 2019 but has no photon namespace
Good day.
Ive probably spent at least 3 hours going back and forth, trying different versions of unity, updating Visual Studio 2019, and recreating unity projects and re-importing the PUN 2 - FREE package in unity.
No dice. When I try accessing the namespace photon.pun ...nothing comes up. Doesn't recognize it.
Unity is also giving an error in the console once i import the package:
error: Assertion failed on expression: 'gForceReimports->empty()'
After PUN 2 - FREE is imported, it is also not showing up in my unity Package Manager. Should it be?
Hopefully someone can help me..
Thanks.
Ive probably spent at least 3 hours going back and forth, trying different versions of unity, updating Visual Studio 2019, and recreating unity projects and re-importing the PUN 2 - FREE package in unity.
No dice. When I try accessing the namespace photon.pun ...nothing comes up. Doesn't recognize it.
Unity is also giving an error in the console once i import the package:
error: Assertion failed on expression: 'gForceReimports->empty()'
After PUN 2 - FREE is imported, it is also not showing up in my unity Package Manager. Should it be?
Hopefully someone can help me..
Thanks.
↧
↧
Additional player instantiated when 2nd player joins room. End up with 3 players on Host instance
I am trying to connect 2 users to a room using a simple 3 scene project (Login, Home, Game). The 1st player logs in and enters the Lobby (Home Scene) The player then creates a new room and loads the Game scene. When the scene is loaded, a local player prefab is instantiated in the Start method of a SpawnManager gameobject/script within the scene. The problem is that when the 2nd player joins the room from a 2nd instance, the 1st players instance instantiates 2 player prefabs in addition to the local player prefab. I end up with 3 player prefabs in the first (host) instance. Seems to me I should only be seeing 2 player prefabs.
Any idea as to what's going on here? Thx
Any idea as to what's going on here? Thx
↧
New players spawning twice on existing players
I have this problem when new players join the room, they get instantiated twice on all the existing players.
I read the code from the PunBasics demo and tried to replicate how it works but the problem still occurs no matter what I do.
I checked the logs on the new players and see that NetworkManager Start function gets called as many times as there are players and I believe this is normal Unity behavior but it should only spawn one player instance for each new player as there is a check to see if the player instance has been created already but it doesnt seem to work that way.
The NetworkManager is a scene object in every scene and it doesnt have a PhotonView component.
The playerPrefab gets instantiated by the NetworkManager in Start() function and that prefab has a PhotonView component.
After the playerPrefab gets instantiated, it instantiates another prefab on the owner's client that is a localPlayerPrefab which then receives input from the player and plays all animations etc.
Here is my code for the NetworkManager:
https://pastebin.com/RzrBM8eM
and here is code for the playerPrefab object that gets instantiated by the NetworkManager:
https://pastebin.com/WWUdVMav
I had pretty much the same setup when I was using the Unity network API and worked quite well but I cant get it to work with Photon. It might be a simple thing that I missed and just cant see.
↧
Rooms not showing
Sometimes, a player creates a room and on 10 players, only 4 will see the room in the RoomList.
I've tried to understand the problem through Unity and in the OnRoomListUpdate function, I receive 0 room in the list of rooms, obvisouly means there's a problem.
I've found other people facing the same issue but never found the solution.
The weird thing is that if I try with the same exact version the next day, it will works and everyone will see the room.
So does anyone know from where this temporary problem comes from ?
I've tried to understand the problem through Unity and in the OnRoomListUpdate function, I receive 0 room in the list of rooms, obvisouly means there's a problem.
I've found other people facing the same issue but never found the solution.
The weird thing is that if I try with the same exact version the next day, it will works and everyone will see the room.
So does anyone know from where this temporary problem comes from ?
↧
How to disconnect from the server and connect for the second game?
Hi,
I use Photon (PUN2) in my game. I game all system and its works (when you play the first game). The user connects to a server, lobby etc. Game, after the game user, should disconnect from the server and when wants play again just connect again to the server. Problem because the user can't disconnect. Why?
First code, when Player finish the game.
I use this function when the user is in the Lobby and join or create the room. The user has possible to leave the room.
When he/she presses the button
"User left from Lobby"
"Disconnect from the server"
" ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: Connected".
https://paste.myst.rs/dy4wm66j
I use Photon (PUN2) in my game. I game all system and its works (when you play the first game). The user connects to a server, lobby etc. Game, after the game user, should disconnect from the server and when wants play again just connect again to the server. Problem because the user can't disconnect. Why?
First code, when Player finish the game.
I use this function when the user is in the Lobby and join or create the room. The user has possible to leave the room.
When he/she presses the button
"User left from Lobby"
"Disconnect from the server"
" ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: Connected".
https://paste.myst.rs/dy4wm66j
↧
↧
[PlayMaker] Getting Players Count on Room
Hi,
I wanted to get Players Count in the Room.
Pun Network Get Players in Room Count action isn't working.
Pun Get Room Properties is working. But, instantly giving this error.
No luck from Playmaker Forums
Thanks
I wanted to get Players Count in the Room.
Pun Network Get Players in Room Count action isn't working.
Pun Get Room Properties is working. But, instantly giving this error.
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.FsmArray.SaveChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmVariables/FsmArray.cs:341)
HutongGames.PlayMaker.FsmArray.set_Values (System.Object[] value) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmVariables/FsmArray.cs:153)
HutongGames.PlayMaker.Pun2.Actions.PunGetRoomProperties.getRoomProperties () (at Assets/PlayMaker PUN 2/Actions/PunGetRoomProperties.cs:145)
HutongGames.PlayMaker.Pun2.Actions.PunGetRoomProperties.OnEnter () (at Assets/PlayMaker PUN 2/Actions/PunGetRoomProperties.cs:103)
HutongGames.PlayMaker.FsmState.ActivateActions (System.Int32 startIndex) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2771)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2718)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2787)
HutongGames.PlayMaker.Fsm.Update () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1995)
PlayMakerFSM.Update () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:594)
No luck from Playmaker Forums
Thanks
↧
Adding names to different players
Hello I'm using unity with photon and I'm having a problem making different names for every player that joins the room .
What I want to make is when a player joins the lobby i want him to take a name like
What I want to make is when a player joins the lobby i want him to take a name like
NewPlayer.gameobject.name = "Player " + the number of players that were in when he joined. If you want anymore information please reply to this post and ill inform you with your question. Thanks
↧
Enable canvas only for one player?
When player dies, i need to enable canvas, but only for this one specific player. How do I do that?
↧
Choose random player avatar from scene issue (always choose masterclient)
Hi Guys, i have written a code to choose random player to be an enemy from player avatars exist in scene but the problem the random code always choose MasterClient Player avatar i've tried many time still choose MasterClient Player avatar
this code execute in masterclient to choose random player
and this RPC method to execute on all clients
this code execute in masterclient to choose random player
if (!PhotonNetwork.IsMasterClient) return; GameObject[] avatars = GameObject.FindGameObjectsWithTag("Player"); int rndViewId = avatars[Random.Range(0, avatars.Length)].GetComponent<PhotonView>().ViewID; photonView.RPC(nameof(RPC_ChooseRandomToBecomeEnemy), RpcTarget.All, rndViewId);
and this RPC method to execute on all clients
[PunRPC] public void RPC_ChooseRandomToBecomeEnemy(int rndViewId) { GameObject[] avatars = GameObject.FindGameObjectsWithTag("Player"); GameObject enemy = avatars.Where(i => i.GetComponent<PhotonView>().ViewID == rndViewId).Single().gameObject; enemy.GetComponent<PlayerType>().BecomeFirstEnemy(); }
↧
↧
Photon disconnect issue
Hi,
I am trying to send a string of data per frame in unity(using unitywebrequest.get method) to an external server and when I make this call, the photon player disconnects. The above method works when I send the data per action or at an instant, but when I send it per frame, photon disconnects. Any possible solutions to this issue?
I am trying to send a string of data per frame in unity(using unitywebrequest.get method) to an external server and when I make this call, the photon player disconnects. The above method works when I send the data per action or at an instant, but when I send it per frame, photon disconnects. Any possible solutions to this issue?
↧
How does RPC works?
I have code:
There are 2 players in the scene. After i call RPC with
I expect 15 to be logged in console, but i got only 10 on both clients. So, RPC acts locally on each client? How to make calls to be summed up?
![75pmgWH8dhI.jpg?size=664x281&quality=96&sign=be60e9b052e3bb2caf74dc29dd89056b&type=album]()
public class TestRPC : MonoBehaviour { private int Opp = 5; float timer = 2f; [PunRPC] public void AddOpp() { Opp += 5; } void Update() { timer -= Time.deltaTime; if(timer <= 0) { Debug.LogError(Opp); timer = 2f; } } }
There are 2 players in the scene. After i call RPC with
PhotonView pv = FindObjectOfType<TestRPC>().gameObject.GetComponent<PhotonView>(); pv.RPC("AddOpp", RpcTarget.All);
I expect 15 to be logged in console, but i got only 10 on both clients. So, RPC acts locally on each client? How to make calls to be summed up?

↧
How to make sure clients use the same build?
Hi everyone,
I have players using a certain build of my game. I want to make some changes to the RPCs and publish a new build, but how can I make sure that players with the new build don't play with players with the previous build?
Thanks in advance for your help
I have players using a certain build of my game. I want to make some changes to the RPCs and publish a new build, but how can I make sure that players with the new build don't play with players with the previous build?
Thanks in advance for your help
↧