Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 iviaguic · Sep 22, 2013 at 06:37 PM · dllnamespacesql

Missing Namespaces

Hi there, I was trying to establish a connection to a Mysql Server using this code, and as far as i know, i need this:

 using System;
 using System.Data;
 using MySql.Data.MySqlClient;    
 [...]

Here comes the problem: when I finished the script (just connecting to the DB) and I went to the Unity editor, i got this errors:

 Assets/Standard Assets/Scripts/SQL/Connection.cs(3,7): error CS0246: The type or namespace name `MySql' could not be found. Are you missing a using directive or an assembly reference?
 
 -------------------
 
 Assets/Standard Assets/Scripts/SQL/Connection.cs(2,14): error CS0234: The type or namespace name `Data' does not exist in the namespace `System'. Are you missing an assembly reference?

I've been looking the whole day for a solution on the internet and the Unity forums, but I can't solve this problem. I've read something about some dlls in this folder:

 /Applications/Unity/Unity.app/Contents/Frameworks/...


But I can´t locate it on my PC, and I'm sure that would fix the problem.

Help is appreciated.

Thank you very much for your time

Comment
Add comment · Show 4
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 Tanshaydar · Sep 22, 2013 at 07:31 PM 0
Share

You sure you have right references and libraries?

avatar image iviaguic · Sep 22, 2013 at 07:57 PM 0
Share

I think so

avatar image Tanshaydar · Sep 22, 2013 at 10:28 PM 1
Share

Well, you should make sure. http://dev.mysql.com/downloads/connector/net/6.1.html#downloads And those are need to be added as a reference to the project too.

avatar image iviaguic · Sep 23, 2013 at 01:12 PM 0
Share

ok, the $$anonymous$$YSQL error is fixed, now i have to correct the system.data one

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by iviaguic · Sep 23, 2013 at 03:45 PM

OK, it's solved...

Go to edit>project settings>player and set API to .NET 2.0 instead of .NET 2.0Subset

Comment
Add comment · Show 3 · 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 dhpandya · Mar 12, 2016 at 01:23 PM -1
Share

this didn't work i changed my api to .NET 2.0 I am using mysql-connector-net-1.0.10.exe my code begins like this: using UnityEngine; using System.Collections; using UnityEngine.Scene$$anonymous$$anagement; using $$anonymous$$ySql.Data.Types; using $$anonymous$$ysql.Data.$$anonymous$$ysqlClient; using $$anonymous$$ysql.Data.dll; Please help

avatar image flashmandv dhpandya · Apr 28, 2016 at 04:12 PM 0
Share

Not working for me either

avatar image Bunny83 flashmandv · Apr 28, 2016 at 06:11 PM 0
Share

You can never "use" an EXE directly. It's most likely an installer which will extract the actual DLL(s) you need somewhere. You have to copy those DLLs into your assets folder in order to use the connector.

avatar image
0

Answer by Seizure · Sep 23, 2013 at 01:52 PM

Make sure you go to Edit -> Project Settings -> Editor and in the WWW Security Emulation put the URL to your server (IP address or link that you use to access the server).

Comment
Add comment · Show 1 · 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 iviaguic · Sep 23, 2013 at 02:43 PM 0
Share

Nope, thats not my problem. $$anonymous$$y problem has to do with DLLs. Read posts before replying please!

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.

Follow this Question

Answers Answers and Comments

20 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

Related Questions

How to fix losing System.Data.dll in Project? 2 Answers

Why does Boo not see namespaces from dlls? 1 Answer

Using C# .dll that doesn't use namespaces 0 Answers

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

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers


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