The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Unity MonoBehaviourPun and MonoBehaviourPunCallBacks not working

donotprikel
2023-03-02 05:11:47

On unity 2020.3.44f1 i did install photon pun 2 and when i went to code a script for it then when i finnished it i got this error.

Assets\Scripts\Lobby\LobbyManager.cs(6,36): error CS0234: The type or namespace name 'MonoBehaviourPun' does not exist in the namespace 'Photon' (are you missing an assembly reference?)

I have used the MonoBehaviourPun in the public class And i have re imported the entire project then the library folder then the ScriptAssemblies folder Now i lost the Assembly-C#.dll file from that. Nothing worked. I even re downloaded and imported the package from the package manager. When i import it it says all assets from this package are already in your project. Nothing to import. It only shows Pun 2 package in the my assets sction of the package manager. But not the in project. I have literly ran out of options on how to fix it. I cant find specific fix for it online. My assistant keeps telling me to download the unity package from the photon web site but it onlys redirects me to the unity asset store. Do you know how to fix it?

this is the code is it wrong?

Comments

Tobias
2023-03-03 12:24:56

You need these using lines:

Back to top