• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by cap_L · Nov 01, 2018 at 11:23 AM · namespace

unity and c# namespace error

Hello all,

I have a problem in Unity and C#. Even though i already imported the namespace in my c# script, it still gives the namespace not chosen error. " The type or namespace name `GLNeuroTech' could not be found. Are you missing an assembly reference?" Does anyone know anything about it ?

Thanks alt text

unity1.png (5.7 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bonfire-Boy · Nov 01, 2018 at 05:03 PM 0
Share

What do you mean by "imported the namespace"?

If you mean you've included a DLL which contains it, then perhaps the DLL isn't actually getting imported.

Or do you mean you've got a "using GLNeurotech" line in your script? If so then is that line number 6 by any chance?

Finally, show us Acquire.cs, especially line 6.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by dan_wipf · Nov 01, 2018 at 12:09 PM

does you scriptname has the same name as your namespace? can cause troubles. or sometimes reloding your visual studio(or what ever software you use)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cap_L · Nov 01, 2018 at 12:21 PM 0
Share

Hey @dan_wipf , No my scriptname is different. The name of my script is Acquire.cs and the namespace it is looking out for is GLNeurotech. Any suggestions ?

avatar image dan_wipf · Nov 01, 2018 at 01:48 PM 0
Share

can you post your code of aqcuire.cs?

avatar image
0

Answer by cap_L · Nov 02, 2018 at 04:01 AM

Hi all,

This issue is solved. I added .rsp file into the assets folder which solved the problem. But i am still getting another error on Unity: "FileNotFoundException: Could not load file or assembly 'BioRadioSDK, Version=1.0.266.19973, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Acquire.Start () (at Assets/Scripts/Acquire.cs:57)" . Although i have added the same version of BioRadioSDK in my reference folder, it still shows this error. Any idea ?

Thanks

Comment
Add comment · Show 9 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dan_wipf · Nov 02, 2018 at 06:03 AM 0
Share

still need code..

avatar image cap_L · Nov 02, 2018 at 06:58 AM 0
Share

Hey @dan_wipf ,

I have attached the code snippet. The error which shows on the Unity screen is this: "FileNotFoundException: Could not load file or assembly 'BioRadioSD$$anonymous$$, Version=1.0.266.19973, Culture=neutral, Public$$anonymous$$eyToken=null' or one of its dependencies. Acquire.Update () (at Assets/Scripts/Acquire.cs:23)". The line 23 refers to ConfigureDevice(num) method.

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using System;
 using System.Diagnostics;
 using GLNeuroTech.Devices;
 using GLNeuroTech.Devices.BioRadio;
 using GLNeuroTech.Devices.BioRadio.Configuration;
 
 
 public class Acquire : $$anonymous$$onoBehaviour
 {
     public static List<Double> eeg_1 = new List<Double>();
     public static List<Double> eeg_2 = new List<Double>();
     //public float time;
     public List<float> timer = new List<float>();
 
     void Update()
     {
         UnityEngine.Debug.Log("Starting acquire class");
         string teststring = "ECFE7E1901A2232321";
         var num = long.Parse(teststring, System.Globalization.NumberStyles.HexNumber);
         ConfigureDevice(num);
     }
 
     void ConfigureDevice(long macID)
     {
         //Console.WriteLine("Entering into the ConfigureDevice function");
         UnityEngine.Debug.Log("Entering into the ConfigureDevice function");
         BioRadioDevice$$anonymous$$anager bioRadioDevice$$anonymous$$anager = new BioRadioDevice$$anonymous$$anager();
         var connectedBioRadio = bioRadioDevice$$anonymous$$anager.GetBluetoothDevice(macID);
         var config = connectedBioRadio.GetConfiguration();

Even though I have already imported BioRadioSD$$anonymous$$ with the same version, it still shows this error.

Thanks

avatar image Bonfire-Boy cap_L · Nov 02, 2018 at 07:13 AM 0
Share

What makes you think that you have successfully imported the SD$$anonymous$$?

avatar image cap_L Bonfire-Boy · Nov 02, 2018 at 07:29 AM 0
Share

coz i have already added the SD$$anonymous$$.dll file to the references.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

96 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

error CS0246: The type or namespace name `rect' could not be found. 1 Answer

error CS0246: The type or namespace name `List' could not be found. 1 Answer

Namespace Functions not being recognized 0 Answers

Can't access another script, think it may be due to namespace/public class ? 1 Answer

The type or namespace name `UnityEditor' could not be found 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges