Unity-Technologies / multiplayer-community-contributions

Community contributions to Unity Multiplayer Networking products and services.
MIT License
429 stars 161 forks source link

error CS0103: The name 'PhotonAppSettings' does not exist in the current context #147

Open ReedySpeedy opened 2 years ago

ReedySpeedy commented 2 years ago

I am currently working to implement the Networking system from BossRoom into my own project so that I can learn how High-Level Networking is implemented in the new Unity Netcode for Gameobjects system.I have reached a point on the "MainMenu" scene that I'm stuck on. After downloading the "Photon Realtime Transport for Netcode for GameObjects" Unity package, I am receiving the error: Library/PackageCache/com.community.netcode.transport.photon-realtime@da6250d3a9/Runtime/PhotonRealtimeTransport.cs(170,50): error CS0103: The name 'PhotonAppSettings' does not exist in the current context This error is NOT being thrown in the BossRoom project and the scripts are identical between my project and the example project. HOW can I overcome this CS0103 error?

Screen Shot 2022-02-08 at 4 24 19 PM
ReedySpeedy commented 2 years ago

Hi MiyasakiSan,

Thank you very much this resolved the compiler error; however, my code in the PhotonAppSettings is now greyed out.

My BEFORE with the !Photon_Unity_Networking looks like your AFTER where the namespace and class code coloring is showing. Any explanation why my !Photon_Unity_Networking is backwards in this way?

Best, Michael Folkard

On Feb 9, 2022, at 10:58 AM, MiyasakiSan @.***> wrote:

Find PhotonAppSettings and Delete ! Before https://user-images.githubusercontent.com/76218140/153238924-de8ecd61-4aa9-434f-9934-29a3fc45db0d.png After https://user-images.githubusercontent.com/76218140/153238793-c740f8d6-35fd-4104-91c1-67211889c1f6.png — Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/multiplayer-community-contributions/issues/147#issuecomment-1033916248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMQX6TIOGYPHODPZC7R233U2KFKRANCNFSM5N4DYADQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

ReedySpeedy commented 2 years ago

Here is the image:

On Feb 9, 2022, at 11:17 AM, Michael Folkard @.***> wrote:

Hi MiyasakiSan,

Thank you very much this resolved the compiler error; however, my code in the PhotonAppSettings is now greyed out.

My BEFORE with the !Photon_Unity_Networking looks like your AFTER where the namespace and class code coloring is showing. Any explanation why my !Photon_Unity_Networking is backwards in this way?

Best, Michael Folkard

On Feb 9, 2022, at 10:58 AM, MiyasakiSan @. @.>> wrote:

Find PhotonAppSettings and Delete ! Before https://user-images.githubusercontent.com/76218140/153238924-de8ecd61-4aa9-434f-9934-29a3fc45db0d.png After https://user-images.githubusercontent.com/76218140/153238793-c740f8d6-35fd-4104-91c1-67211889c1f6.png — Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/multiplayer-community-contributions/issues/147#issuecomment-1033916248, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMQX6TIOGYPHODPZC7R233U2KFKRANCNFSM5N4DYADQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.

JoseLu1200 commented 2 years ago

Hi, i used this method and it fixed the compiling error, but photon window doesent appear in my project and there are any PhotonServerSettings.cs file generated

ReedySpeedy commented 2 years ago

@JoseLu1200 Are you having any issues with the UnityTransport Class as well? I'm using the Unity.Netcode namespace and it's not recognizing the class (this would be in the ClientGameNetPortal script on the BossRoom project).

JoseLu1200 commented 2 years ago

@JoseLu1200 Are you having any issues with the UnityTransport Class as well? I'm using the Unity.Netcode namespace and it's not recognizing the class (this would be in the ClientGameNetPortal script on the BossRoom project).

As far as i know no, I don't have problems with the UnityTransform Class for now.

ReedySpeedy commented 2 years ago

@JoseLu1200 And are your packages aligned with this? Version on the Unity Transport and Unity Transport Netcode for Gameobjects.

Screen Shot 2022-02-10 at 6 27 15 PM
JoseLu1200 commented 2 years ago

These are my game packages image