This project is a drop in replacement for the default Database.cs
script in UMMORPG Remastered.
Please be advised -
- This script was created for UMMORPG Remastered v2.34.0 which was the latest as of 08/05/2021
- This is a free add-on. I will not troublshoot issues for you. If you see a bug, log the issue and I'll fix it if I have time. Better yet, fix it yourself and open a pull request.
- No optimizations or improvements where made to this script - this is a 1:1 conversion of existing logic. The default database design is so poor that there isn't much to be done without a total re-write. (No offense intended to Vis2k, it's good enough to get a beginner started).
Send me pull requests if you want to see some changes.
Open issues if you find a bug.
Send me a tip if you use Brave and you want to give back.
This is your only warning.
We'll be using docker because it's dead simple.
- Install docker
- Pull down and run the MySQL or MariaDB docker images. Either will work.
- No need to create any schema or tables, the script will auto-generate everything. Just note down the username/password you passed into the docker container.
- Launch Unity and open your project.
- Download or pull down this repo.
- Drag and drop the folder
MySQL
(under plugins) toAssets-> uMMORPG -> Plugins
- You'll get some errors, don't panic. These show up because Unity doesn't know how handle .net assembly dependency versions that are higher than the listed requirements.
- Select the .net assembly
MySqlConnector
underAssets/uMMORPG/Plugins/MySQL/MySqlConnector/
and uncheck theValidate References
property underGeneral
in the inspector. ClickApply
in the inspector. - Right click
MySqlConnector
in the project window and selectRe-import
- Do the same to
System.Memory
andSystem.Threading.Tasks.Extensions
. Don't forget to re-import after each change. - If you're still seeing errors double check that
Validate References
is unchecked on all 3, clear your console, then Re-importMySqlConnector
. - Next Drag and drop the
Database.cs
file from this repository toAssets-> uMMORPG -> Scripts
in your project. SelectYes
to overwrite the existing file.
- Load up your level scene and select the
NetworkManager
in the hierarchy. - You'll see a
Script missing
message where the database script used to be. - Drag and drop the new
Database
script into the missing script field. - The component properties will populate allowing you to enter the user id and password you used to set up mysql earlier.
- Hit play and test it out.