- Home /
'MonoBehaviour' does not exist in the namespace 'Photon'..
I am trying to follow an old tutorial, and can't get it to work even when followed step by step. I am stuck on step 6 of like 26... So, to see if the original even works, I downloaded the tutorials source files, and imported the newest version of photon, (and removed the old version from 2013). Now I am getting an error:
"The type or namespace name 'MonoBehaviour' does not exist in the namespace 'Photon'. Are you missing an assembly reference?
Can someone tell me what this means? Also, is there a better fps tutorial out there that isn't outdated? Thanks
Answer by Ashmouz · Jun 13, 2015 at 07:03 PM
I had this problem too. You need to get the photon folders (specially, the "Editor" folder) out of the main photon folder which is created when you import the photon asset from the store. Make sure you put them in the Standard assets folder or Plugins folder. Note: after replacing these folders, Some of the demo samples that came with the photon wont work anymore. however, BE CAREFUL! Good luck!
Thank you, this got rid of my error! I was going to have to redo my entire script, but now I don't have to!
Answer by Kiwasi · Jan 28, 2015 at 07:31 PM
Do you have using UnityEngine at the top of your script? MonoBehaviour is part of UnityEngine.
But if you are using photon then you might want to use photons version of MonoBehaviour.