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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

I have a error

Discussion in 'Scripting' started by denisbiris, Sep 7, 2020.

  1. denisbiris

    denisbiris

    Joined:
    Jul 24, 2019
    Posts:
    8
    This is the error what i encounter:

    "Assets\AwesomeTechnologies\VegetationStudioPro\Runtime\Utility\ScreenshotUtility.cs(6,7): error CS0138: A 'using namespace' directive can only be applied to namespaces; 'PlayerLoop' is a type not a namespace. Consider a 'using static' directive instead"

    I installed the next packages: mathematics,entities,collections,burst,post processing,jobs

    This is code written in ScreenshootUtility.cs:
    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEditor;
    5. using UnityEngine;
    6. using UnityEngine.LowLevel.PlayerLoop;
    7.  
    8. namespace AwesomeTechnologies.Utility
    9. {
    10.     [AwesomeTechnologiesScriptOrder(200)]
    11.     public class ScreenshotUtility : MonoBehaviour
    12.     {
    13.         public void TakeScreenshot()
    14.         {
    15.             ScreenCapture.CaptureScreenshot("Screenshot_" + Guid.NewGuid() + ".png", 1);
    16.         }
    17.  
    18.         void LateUpdate()
    19.         {
    20.             if (Input.GetKeyDown(KeyCode.Alpha0))
    21.             {
    22.                 Debug.Log("screenshot");
    23.                 TakeScreenshot();
    24.             }
    25.         }
    26.     }
    27. }
    Please help me, thanks!
     
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,498
    What happens if you comment out line 6?
    Code (CSharp):
    1. // using UnityEngine.LowLevel.PlayerLoop;
     
  3. denisbiris

    denisbiris

    Joined:
    Jul 24, 2019
    Posts:
    8
    When i comment or delete line 6 i get 119 errors, i can save console log to put a log file here?

    Edit: I have attached a link where you can read a txt file with the errors I receive
    https://textuploader.com/1f3gl
     
    Last edited: Sep 7, 2020
  4. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,498
    Instead of UnityEngine.LowLevel.PlayerLoop (which isn't valid for me either), try..
    Code (CSharp):
    1. using UnityEngine.LowLevel;
    2. using UnityEngine.PlayerLoop;
     
  5. denisbiris

    denisbiris

    Joined:
    Jul 24, 2019
    Posts:
    8
    Same.. i recieve 118 errors
    See it: https://textuploader.com/1f3gl
     
  6. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,498
    Based on that I'd say your best course of action would be to contact Awesome Technologies about the issue you're having with Vegetation Studio Pro. Maybe someone else can help, but while you're waiting..
     
  7. denisbiris

    denisbiris

    Joined:
    Jul 24, 2019
    Posts:
    8
  8. denisbiris

    denisbiris

    Joined:
    Jul 24, 2019
    Posts:
    8
    The issue is resolved after i installed the next packages:

    Mathematics version 1.2.1
    *Jobs version 0.0.7 preview 3
    *Collections version 0.0.9 preview 4

    Post Processing version 2.3.0

    Vegetation Studio Pro - version 1.2 does not support a newer version for jobs and collections packages, i don't know why.

    Maybe my problem is encountered by someone else and this topic can help him.

    Thanks for all answers.
     
    unitySYX and adamgolden like this.