Making a REST service using Node and Express to use with Unity - Part 4

So far, we have managed to receive and send data between nodejs server and unity client. But it was limited to display only on console. This part, I’d like to build some GUI stuff to make it more pleasing to look at! Unity ninjas love to make some GUI stuff after all 😎. I love Scriptable Objects in Unity. If you missed or dodged it, check out my completed series about MVC with Scriptable Objects in Unity....

November 10, 2019 · Cem Ugur Karacam

MVC in Unity with Scriptable Objects Part 3

Here is the last part of the MVC project. I’ve tried to make a schema to illustrate the workflow of MVC in unity. In a unity app, MonoBehaviour objects live in a scene, so you could see what objects in the hierarchy. But these objects can’t communicate with each other directly. MVC pattern in unity is a useful solution to that problem. Let’s try to write it simply: User input –> Controller —–createView(ModelData)—–> View —–display(ModelData)...

October 24, 2019 · Cem Ugur Karacam

MVC in Unity with Scriptable Objects Part 2

This part we will start to make some view elements to visualize item objects and an info panel to display item stats. A very basic inventory system as you guess. I’ll focus on inventory panel for this part and we will complete this series with finishing info panel in the next part. But first let’s overview for this part: Visual components for Item Info and Inventory Item View Prefab in Inventory Populate inventory with Item View Debug....

September 29, 2019 · Cem Ugur Karacam

Making a REST service using Node and Express to use with Unity - Part 3

Greetings to all unity ninjas! This part we’ll make a POST request from a unity client to the node server. We haven’t made a database, yet, so I’ll make an array for now. Start with server-side. In app.js, remember that we had a single enemy object, this part, I’ll make an array and populate with some enemy. let enemies = [ { "id": 0, "name": "orc", "health": 100, "attack": 25 }, { "id": 1, "name": "wolf", "health": 110, "attack": 25 } ]; Next, tell express to support JSON-encoded bodies....

September 24, 2019 · Cem Ugur Karacam

MVC in Unity with Scriptable Objects Part 1

Welcome to the first part of MVC in Unity with Scriptable Objects. I’ll make this part Scriptable Objects only and it will remain plain and simple. First, hear from unity: A class you can derive from if you want to create objects that don’t need to be attached to game objects. This is most useful for assets which are only meant to store data. Then we should ask....

September 16, 2019 · Cem Ugur Karacam

Making a REST service using Node and Express to use with Unity - Part 2

Hello fellow developers! Thanks for all good vibes for part-1. We will deep dive into unity again. Here’s the github project, if you want to follow along with blogpost. I’ve decided to make another series, Unity MVC with Scriptable Objects, to boost up our ninja rest communication skills with unity in our development. Follow me on this, I’ll update when it’s ready! Last part, we have started small. This part we will meet JsonUtility class to parse our data....

September 8, 2019 · Cem Ugur Karacam

Making a REST service using Node and Express to use with Unity - Part 1

Making a game with unity is super cool. But what about online features like saving some data to a database like user info, progress, items, enemies…? You may familiar with node and rest api, but to sending a request from unity and handling received data is a bit itchy in unity. So let’s throw a blog series with unity and node. Then we gonna host it on heroku! In this part we’ll make our “Hello World” project....

September 3, 2019 · Cem Ugur Karacam