• 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 /
This question was closed May 13, 2014 at 12:23 PM by Cerbion_ for the following reason:

The question is answered, right answer was accepted

avatar image
Question by Cerbion_ · Jul 14, 2013 at 12:45 PM · c#standaloneconnectionsqlemail

SQL Connection doesn't work in standalone/build

Well hello there once again, for the past few days I managed to make a Script for my MMO which works the following way:

First of all a connection to the Master Server is established (using, Network.Connect)

then the user sees the login/register screen, where he'll connect to the database and either create a new account or check if the password and username are correct, so that the userID and player data canbe load into the game.

Now my problem: That works all just too well, if I try it out in Unity, but if I build the project and try it out as a standalone .exe it just won't work..

both sending confirmation email and connecting to the DB doesn't seem to work in standalone.. help :O

Comment

People who like this

0 Show 8
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 Cerbion_ · Jul 15, 2013 at 04:15 PM 0
Share

The question is still bugging but I am currently making a workaround for it, but I still would like to know an explanation or even a solution for this :I

avatar image Dave-Carlile · Jul 15, 2013 at 04:18 PM 0
Share

Going to need a lot more information. Are you logging errors? Also, is the client connecting directly to the database, or do you mean "server"? Connecting the client directly to the database is NOT the way to go for an MMO.

avatar image Cerbion_ · Jul 15, 2013 at 04:33 PM 0
Share

erm Firstly: I am catching Error message by using the Try{} catch() code segment, however, I just tested it, it doesn't even reach that points, it's like the Standalone just can't use the SQL commands at all.

Secondly: I am aware that the client shouldn't directly connect to the server, but it's at the moment a test, I want to shift that later to the server exe. But since that would be a standalone as well, it wouldn't work there as well, so untill it's working for the regular client.exe I can't assume that it will work for the server.exe

Thirdly: I am currently working to let the Editor version handle everything but that's not what I want later on, I want the master server to run without Unity.. :I

avatar image Cerbion_ · Jul 18, 2013 at 12:33 AM 0
Share

I reworked the code and made all the SQL and SMTP stuff serverside, yet it only works in the Editor, if I compile and build the standalone .exe it won't connect to the SQL server properly. Any explanation/Solution?

avatar image Graham-Dunnett ♦♦ · Jul 18, 2013 at 12:34 PM 0
Share

Add some Debug.Logs into your script code, then post here the player.log. I suspect that the standalone is failing because it cannot locate your DLLs.

Show more comments

1 Reply

  • Sort: 
avatar image
Best Answer

Answer by Cerbion_ · Jul 22, 2013 at 11:37 AM

I finally found the answer myself and thanks to this post: http://answers.unity3d.com/questions/42955/codepage-1252-not-supported-works-in-editor-but-no.html

However, the answer is that there are a bunch of neccessary .DLL files (l18N) who need to be imported into the assets of the project in order to work, I simply copied them from

C:\\Program Files (x86)\\Unity\\Editor\\Data\\Mono\\lib\\mono\\unity

to a folder in my project called 'Plugins' and it works just as well as I hoped to! :)

Comment
YBOT
abhishek_agrawal
eXact4
IEdge
EvilBozkurt

People who like this

5 Show 5 · 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 Ted Chirvasiu · Aug 21, 2014 at 08:11 AM 0
Share

Thank you sooo much!

avatar image YBOT · Jun 19, 2016 at 11:54 AM 0
Share

Hey thanks for sharing the fix, just to clarify did you create a folder called 'Plugins' and put it in there? Because I cannot find such a folder. Also you put this into your standalone projects data folder right? Hope your still active. Thankyou.

avatar image jamal-dahbur · Oct 10, 2016 at 12:48 AM 0
Share

Hey this is a long shot, but we're trying the same methods, and it works for android build, but iPhone constantly crashes when opening the connection, is there something we're missing?

avatar image IEdge · Jul 03, 2018 at 02:21 AM 0
Share

Thanks you! ^^

avatar image EvilBozkurt · Nov 08, 2018 at 07:01 PM 0
Share

Thanks dude i fixed my mysql connection problems after build with this method

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

22 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

Related Questions

Distribute terrain in zones 3 Answers

MSSQL Connection and Select 2 Answers

Multiple Cars not working 1 Answer

Errors attempting to connect to a database 0 Answers

An OS design issue: File types associated with their appropriate programs 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