Search Unity

The name 'ScreenCapture' does not exist in the current context...

Discussion in 'Unity Cloud Diagnostics' started by LORUnityDeveloper2, Oct 11, 2019.

  1. LORUnityDeveloper2

    LORUnityDeveloper2

    Joined:
    Feb 20, 2017
    Posts:
    5
    Hello all,

    I am trying to implement the user reporting on different projects. I had one working without problem. And when I doing the next one. I am getting:

    The name 'ScreenCapture' does not exist in the current context.

    I have no idea to solve this. Can someone please help? Thanks

    Derek
     
  2. bretth_unity

    bretth_unity

    Joined:
    Dec 1, 2016
    Posts:
    38
    It sounds like you're using the package for 2018.3 and above on a lower version of Unity. Which version of Unity is this project using?
     
  3. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    I just had the same problem on 2018.4, and found here as the only place that appeared relevant, but eventually found the solution. So I'm sharing it for anyone else having the issue.

    In the "Packages" window, choose the "Built-in packages" list (top-left drop down menu). Make sure both "Image Conversion" and "Screen Capture" packages are enabled. My problem was I did not have "Image Conversion" enabled (I have most packages disabled for build size).
     
    chmodseven, sama-van, ZAUBAR and 3 others like this.
  4. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Otherwise, if you do not see those 2 packages in the Package Manager, you can add them manually in the .../Packages/manifest.json file :
    Code (CSharp):
    1.     "com.unity.modules.imageconversion": "1.0.0",
    2.     "com.unity.modules.screencapture": "1.0.0",