PLATFORM AGNOSTIC CODE
Even if it has been developed with Unity, since it's been designed using design patterns it's easy to port this code to any exiting C++, Java, Unreal, etc...
If you checkout the project right now you will be able to use the MySQL database and perform all the available operation, include deleting locations, so please play nice because someone else in the developer community could need the data. The only thing you need to do is to set your own credentials here:
If you want to use Firebase then you will have to download the JSON configuration file from Firebase website and replace the file here:
You have 2 options to make run the project. Follow the videotutorial and import the package from here:
Clone the repository and follow the tutorial since the minute:
If you are developing a game or an application that uses geolocation in order to organize local party games in real locations like some augmented reality games do or you are developing a shared economy application that uses geolocation to enable the exchanges of services, this asset will help you out to organize that geolocation data without having to worry about creating by hand the whole database.
This asset allows an automatic creation of the geolocation database by itself using the Google map data.
Also this asset has been programmed using design patterns and we will see how you can easily replace the different modules. To illustrate that, you will see in the videotutorial how we can work with a MySQL database and later we will switch to Firebase database to store data without having to change anything from the source code.
TUTORIAL 1: INSTALLATION
1.1. Create a new Unity project. 1.2. Import the package "Map Event Organizer" from Unity Asset Store. 1.3. Switch to the Android platform. 1.4. Download and install XAMMP apache server in your computer. 1.5. Start the XAMPP control panel and start the Apache and MySQL modules. 1.5. Access the the web administration panel of phpMyAdmin, create a new database and import the SQL file inside the project that contains the database structure. 1.6. Copy and paste the PHP database services files to the webapplication folder of XAMPP "C://xampp/htdocs/mapeeventorganizer/" 1.7. Go back to Unity Editor and select MainController gameObject on the scene and set the properties: UrlBasePHPLocation to "http://localhost:8080/mapeeventorganizer/". and GoogleAPICredentials to your own Google credentials 1.8. If everything is in order you should be able to connect to the database. 1.9. Now we can proceed to enter some locations to test how the system works properly. 1.10. If we refresh the tables in the MySQL web browser we should see how the new locations had been inserted. 1.11. Then, we have two ways to browse the locations. 1.12. The first option is to navigate through the map and we will see the icons that belong to the locations we have previously inserted. 1.13. The second option is to navigate through a basic item list menu that will allow to check the structure created for the locations.
TUTORIAL 2: FIREBASE
2.1. In order to work with Firebase we will use the preprocessor constant ENABLE_FIREBASE 2.2. Next we have to import the Firebase SDK into the project. You should import these 3 packages: FirebaseAnalytics FirebaseAuth FirebaseDatabase 2.3. Then, previously you would have created a project in Firebase developer console. You have to access to the configuration and download the JSON file that will allow the system to connect with the remote Firebase database. If it's not connecting of the first try, just reload the Unity project and it should have been configured the right way. 2.4. Now, go back to Unity Editor and select MainController gameObject on the scene and set the properties: UrlFirebaseLocation with the URL to your Firebase project 2.2. Finally, you are good to go. You should be able to start the application and proceed to create new locations in Firebase database.