Skip to main content
Up and Coming
October 5, 2021
Solved

Importing Oculus integration into unity gives "does not exist in the namespace 'Net'

  • October 5, 2021
  • 3 replies
  • 5416 views

Hi Guys,

 

I'm just trying to get started using the Oculus SDK but upon importing Oculus integration into my unity project 2019.4.8f1 I get 8 Assets\Oculus\Avatar\Samples\SocialStarter\Assets\Scripts\P2PManager.cs "does not exist in the namespace 'Net' errors for things like Connect, Close etc. It doesn't do this in a fresh project so obviously something specific to do with mine.

I have tried installing my main packages into a fresh build and then installing Oculus Integration and it doesn't give these errors. But I'm not really sure what might be causing this, any ideas?

Help is appreciated, searching around yields zero results of someone having this same error that I can find.

This topic has been closed for replies.
Best answer by julienkay

Sweetfyre wrote:

Oculus Integration is version 33.0 I am not able to remove it actually in the package manager. Is there a different way it needs to be removed or is that possibly part of the problem, it's like not actually registered properly or something? Installing again has no effect.


That is all correct, Afaik, you can't remove Asset Store assets via the Package Manager. To do a complete reimport I'd close Unity and delete the entire Oculus folder, then reimport. But if the script is present I don't know whether this will actually help.

 

Another thing i just noticed, that P2PManager is in the global namespace, so it might be that there's is some naming clash with the 'Net' namespace in your project.

 

I think your solutions is fine though, if you don't need those features you should be good.

3 replies

Honored Contributor
October 6, 2021

Maybe an incomplete udpdate from an older version of the Oculus Integration? Which version of the Oculus Integration are you using? Have you tried removing the Oculus Integration completely and reimporting it?

 

Can you confirm that Platform.cs script in \Oculus\Platform\Scripts\ is present on your PC? That's were these methods should be.

SweetfyreAuthor
Up and Coming
October 7, 2021

Platform.cs is in there in assets/Oculus/Platform/Scripts/

 

Oculus Integration is version 33.0 I am not able to remove it actually in the package manager. Is there a different way it needs to be removed or is that possibly part of the problem, it's like not actually registered properly or something? Installing again has no effect.

 

I currently am proceeding by deleting the p2pmanager.cs file and then commenting out the 8 references to it in the SocialPlatformManager.cs. I don't plan to use any p2p features but I don't know if this will cause issues down the road using it this way. At least I can compile and keep working though.

julienkayAnswer
Honored Contributor
October 7, 2021

Sweetfyre wrote:

Oculus Integration is version 33.0 I am not able to remove it actually in the package manager. Is there a different way it needs to be removed or is that possibly part of the problem, it's like not actually registered properly or something? Installing again has no effect.


That is all correct, Afaik, you can't remove Asset Store assets via the Package Manager. To do a complete reimport I'd close Unity and delete the entire Oculus folder, then reimport. But if the script is present I don't know whether this will actually help.

 

Another thing i just noticed, that P2PManager is in the global namespace, so it might be that there's is some naming clash with the 'Net' namespace in your project.

 

I think your solutions is fine though, if you don't need those features you should be good.