

You couldn’t just send a C# object over, but you could send a JSON representation of that object and let the server recreate a localized version of it there.

For example, you might have a web server running in Java or PHP. JSON: This stands for JavaScript Object Notation, which is a convenient format for sending and receiving data that is language agnostic. It’s the opposite of serialization, namely the conversion of a stream of bytes into an object. an object into bytes), whereas marshalling is about getting parameters from one place to another.ĭeserialization: This is exactly what it sounds like. Serialization and marshalling are loosely synonymous, but in case you’re wondering what a strict difference would be, serialization is about converting an object from one form to another (e.g.

Note: If you’re a Java or web developer, you might be familiar with a concept known as marshalling. If you’ve ever added to get something to appear in the inspector, you now have an idea of what’s going on.
#IS DOWNLOADING UNITY WEB PLAYER SAFE CODE#
In fact, whenever you create a MonoBehaviour script, Unity uses serialization & deserialization to convert that file down to C++ code and then back to the C# code that you see in the inspector window. What is an “object”? In this case an “object” is any script or file in Unity. That might seem vague but take a quick look at this graphic: Serialization is the conversion of an object into a stream of bytes. Serialization: This is the magic that makes Unity work. This should only be used for keeping track of simple things like graphics, sound settings, login info, or other basic user-related data. Many new programmers make the mistake of thinking they can use this as a save game system as well, but it is bad practice to do so. PlayerPrefs: This is a special caching system to keep track of simple settings for the player between game sessions. There are four key concepts to saving in Unity: You will be implementing the code for saving and loading the game, as well as the logic for saving the players settings. Getting Startedĭownload the starter project here. Note: If you are new to Unity or looking to pick up more Unity skills, you should checkout out our other Unity tutorials where you can learn about lots of Unity topics from C# to how the UI works. Even if you are new to C#, you should have no trouble keeping up except for a few concepts that might require further reading. It is assumed that you have some basic working knowledge of how Unity works (such as being able to create and open scripts), but other than that everything has been prepared so this tutorial will be very easy to follow.
#IS DOWNLOADING UNITY WEB PLAYER SAFE HOW TO#
