I lost all integrations like photon\unity after using "player custom properties"

Options
(sry for my en)Everything was ok for 2 or 3 weeks at least until i tried to use "player custom properties" in game. I just followed some tutorial from forum for using player custom properties. In one situation i used SetPlayerCustomProperties for save each player team's name like below:
note: the game is 1 vs 1
public override void OnPlayerEnteredRoom(Player newPlayer)
        {
            ExitGames.Client.Photon.Hashtable playerProperties = new ExitGames.Client.Photon.Hashtable();
            if (PhotonNetwork.CurrentRoom.PlayerCount == 2)
            {
                playerProperties.Add("Team", "Guest");
                PhotonNetwork.SetPlayerCustomProperties(playerProperties);

                // Load the Game level
                PhotonNetwork.LoadLevel(gameLevelName);
            }
            else
            {
                playerProperties.Add("Team", "Host");
                PhotonNetwork.SetPlayerCustomProperties(playerProperties);
            }
        }
this code had no error and after it i just tried to get this property for instantiating player in right location based on his team in new scene. but after some hours i couldn't get this player property without error. I delete my 4-5 lines new codes but one error still was remain in editor and didn't let me run project anymore:
Assets\Photon\PhotonRealtime\Code\Player.cs(134,26): error CS0102: The type 'Player' already contains a definition for 'CustomProperties'
Based on some suggestions on forum I checked for variables and functions name but everything was ok.
Anyway for get player custom properties i used some ways like below:
PhotonNetwork.LocalPlayer.CustomProperties("Team");

but none of them worked. i delete all codes(was 7-8 lines) was related to player custom properties (read\write) but error still remain for me. furthermore i found my integeration for all imported asset like photon and CrossPlatformInput it's gone! No Input menu on top for CrossPlatformInput and no menu for photon too. and after this any change to codes brings new errors for all project scripts in this format:
Assets\Photon\PhotonChat\Demos\DemoChat\ChatAppIdCheckerUI.cs(12,14): error CS0234: The type or namespace name 'Pun' does not exist in the namespace 'Photon' (are you missing an assembly reference?)
Error Image : https://imgur.com/HChjwo6
i want to know what happened to my dear project? :smile:

Best Answer

  • WhiteSparrow
    edited February 2020 Answer ✓
    Options
    for "The type or namespace name 'Pun' does not exist..." i tried for re-import pun for my project and found some files was missed and after it everything went ok. even crossplatform input menu on top got back! btw, i can't say this error occurred for what and why this affected on project even on other parts like crossplatform. I'm just sure all this happened automatically and i didn't touch any files from project.

Answers

  • WhiteSparrow
    edited February 2020 Answer ✓
    Options
    for "The type or namespace name 'Pun' does not exist..." i tried for re-import pun for my project and found some files was missed and after it everything went ok. even crossplatform input menu on top got back! btw, i can't say this error occurred for what and why this affected on project even on other parts like crossplatform. I'm just sure all this happened automatically and i didn't touch any files from project.