简体   繁体   中英

The type or namespace name `PostProcessing' does not exist in the namespace `UnityEngine.Rendering'

Do someone know how to fix this? I got this error after importing Cinemachine from the Unity Asset Store. I'm using Unity 2018.1.0f2 and have no problems with 2017.3.1f1

Error

The type or namespace name PostProcessing does not exist in the namespace UnityEngine.Rendering

Using Unity 2018.2 --

Go to Window>Package Manager Click on the All tab Find Postprossessing and import Find Cinemachine and import

here's something that should work - it worked for me! go to window > package manager. search for postprocessing and click install. wait for it to download. close package manager. DONE!

The Way I found to Fix This Error is This:
1. go to Window -> package manager
2. select post-processing
3. click on version and select old version
4. click Up to date

I was hoping someone else had an answer to this. I ran into the same problem, importing Cinemachine in Unity 2018.1.0 while importing the 3D Game Kit. First of all, I couldn't find any support on the many errors that occur when importing the 3D Game Kit, including the 'PostProcess' namespace error. Even the Game Kit's documentation and tutorial make no mention of it's requirements for Cinemachine, TextMesh Pro and Post-processing packages. Anyway, so far I've managed to fix all the other errors, except the 'error CS0246: The type or namespace name PostProcess...' errors. I tried downloading and importing the post-processing and all other related packages, but the errors remain.

The only mention of the issue I found was from a comment in the CinemachinePostProcessing.cs code itself. At the top it says:

"NOTE: If you are getting errors of the sort that say something like: "The type or namespace name `PostProcessing' does not exist in the namespace" it is because the PostProcessing v2 module has been removed from your project.

To make the errors go away, you can either: 1 - Download PostProcessing V2 and install it into your project or 2 - Go into PlayerSettings/OtherSettings and remove the Scripting Define for UNITY_POST_PROCESSING_STACK_V2

-I wasn't able to find any "PostProcessing V2" anywhere (not on Asset Store either), so I am hoping that it is referring to the most recent Post-processing Stack from Unity Technologies.

I will try to post any solutions I find, but for now I'll give a couple more suggestions I found online (not from Unity though):

-One person said that this error is occurring because the PostProcessing is not yet added to Unity's DLL, you have to: "Put the script that accesses using UnityEngine.PostProcessing; inside of the PostProcessing folder."

-That might cause a problem with Cinemachine, because it is Cinemachine's scripts accessing UnityEngine.Rendering.PostProcessing. (*NOTE that the person said "UnityEngine.PostProcessing", but it is "UnityEngine.Rendering.PostProcessing" that Cinemachine accesses.) The Cinemachine scripts aren't in the "PostProcessing folder" and I don't know if you can just move them to the "PostProcessing folder" without causing more errors.

-Also, another source said that the 'Post-Processing error' is because Cinemachine is not 'linked' properly in the Editor's Package Manager. They said "Package Manager doesn't see Cinemachine as an installed package". Supposedly, this problem can be fixed in Unity's Project Manager.

-Another person said "If you delete the postfx directory[Cinemachine] and rerun the package at the root, it starts to work."

I will try to fix the errors, hopefully this info helps me or someone else.

*UPDATE: After getting rid of the 'PostProcessing' errors using Package Manager (updating the packages used), I was hit with 4 new errors from a Cinemachine Axis script (does not contain a definition for `m_InvertInput') Although Unity forums insisted a restart of the Editor would solve the issue, no amounts of restarting and refreshing helped. I had to comment-out the lines referring to m_InvertInput. That fixed it, but now there was only 1 new error, the GameKit Project was asking for the ProBuilder asset. After importing, that error left. But now Probuilder scripts have 7 errors in them preventing the project from running still, so on it goes...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM