Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Type or namespace name not found when using package

Discussion in 'Linux Editor' started by albanmdb, Jul 20, 2020.

  1. albanmdb


    Jul 10, 2020

    I'm new to Unity. I am trying to use the Barracuda package. I installed it via the package manager. It worked well as I am able to preview .onnx models in Unity.
    However, I run into an error when trying to use the barracuda in c# script. It seems the script isn't able to locate the package. I get the following error: "The type or namespace name 'Barracuda' could not be found (are you missing a using directive or an assembly reference?)". I get the same error when trying to import the default packages, such as Burst.
    My script is as default as it gets.

    Code (CSharp):
    1. using System;
    2. using Barracuda;
    3. using System.Linq;
    4. using UnityEngine;
    5. using System.Collections;
    6. using System.Collections.Generic;
    7. using System.Text.RegularExpressions;
    9. public class LoadModel : MonoBehaviour
    10. {
    12.     // Start is called before the first frame update
    13.     void Start()
    14.     {
    16.     }
    18.     // Update is called once per frame
    19.     void Update()
    20.     {
    22.     }
    23. }
    Thanks' in advance!
    Edit: I actually get the same error in windows.
    Edit: The correct way to import is with with "using Unity.Barracuda". My bad!
    Last edited: Jul 20, 2020