Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Please help Im new to C#

Discussion in 'Scripting' started by DashingMortis, Jun 4, 2020.

  1. DashingMortis

    DashingMortis

    Joined:
    Jun 1, 2020
    Posts:
    13
    Pleasw help it says
    error CS0234: The type or namespace name 'PostProcessing' does not exist in the namespace 'UnityEngine.Rendering' (are you missing an assembly reference?)


    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using Audio;
    5. using TMPro;
    6. using UnityEngine;
    7. using UnityEngine.Rendering.PostProcessing;
    8.  
    9. public class Settings : MonoBehaviour {
    10.  
    11.     public TextMeshProUGUI graphicsText, musicText, sfxText;
    12.     public PostProcessLayer ppl;
    13.     private bool graphics, music, sfx;
    14.  
    15.     private void Start() {
    16.         graphics = true;
    17.     }
    18.  
    19.     public void ChangeGraphics() {
    20.         graphics = !graphics;
    21.  
    22.         ppl.enabled = graphics;
    23.         graphicsText.text = "Graphics - ";
    24.         graphicsText.text += graphics ? "Fancy" : "Performance";
    25.     }
    26.  
    27.     public void ChangeMusic() {
    28.         bool s = AudioManager.Instance.muteMusic;
    29.         if (s) musicText.text = "Music - off";
    30.         else musicText.text = "Music - on";
    31.     }
    32.  
    33.     public void ChangeSounds() {
    34.         bool s = AudioManager.Instance.muted;
    35.         if (s) sfxText.text = "Sounds - off";
    36.         else sfxText.text = "Sounds - on";
    37.     }
    38.  
    39. }
    40.  

    And also it says
    error CS0246: The type or namespace name 'PostProcessLayer' could not be found (are you missing a using directive or an assembly reference?)
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,748
    I believe you need to install the Post Processing package from the Package Manager (Window -> Package Manager, make sure "All packages" is selected in the top left, search for "post", select it, click install).
     
    Batuhan13 likes this.
  3. DashingMortis

    DashingMortis

    Joined:
    Jun 1, 2020
    Posts:
    13
    Thanks bro u rlly helped me alot