Migration from v1.x.x to v2.0.x¶
This is a migration guide if you need to upgrade your Unity SDK v1.x.x to a 2.0.x version. If you are starting a project from scratch, follow the Getting Started guide instead.
If you already have a 2.0.x version, you can ignore this guide.
0. Backup your project¶
This goes without saying, but you should have backups of your project. Make one before the migration, so you can revert to a usable state if something goes wrong.
You are responsible for any data loss that may occur.
If you use a VCS (version control system, like Git or Mercurial), this is done for you. Make sure that you have commited or discarded any pending change.
If you don’t use a VCS, use a VCS. You won’t regret it.
1. Remove the old SDK¶
If you made changes in any part of the SDK code, they will be overwritten. You should send us your modifications, we could maybe integrate them in the next release.
Delete the following assets from your Unity project:
- any
AsmodeeDigital
folder Plugins/AVProVideo
Plugins/Reporter
Plugins/Best HTTP (Pro)
Samples
IMPORTANT: do NOT remove TextMesh Pro
, we still need the version with
source code.
The free version available on the Asset Store is contained in .dll
files, and
is not compatible with the SDK. We will eventually fix this.
2. Follow the Getting Started guide¶
In this part, do as if you where installing from scratch. Download the SDK and its dependencies by following the Getting Started guide, then come back here.
IMPORTANT: do NOT install TextMesh Pro
from the Asset Store, it’s not
compatible with this version of the SDK (yet). If you don’t already have the source
code for TMP, contact us.
3. Use the newest CrossPromo¶
The CrossPromo prefab was changed a bit. So if you used it, you should remove the ones existing in your scenes, and drag-drop the new one instead.
Remember to rebind buttons to the CrossPromoView
component (now at the root of
the CrossPromo prefab).
Remember to also check the NetworkParameters
in the CrossPromoManager
(also
at the root of the CrossPromo prefab).
4. Take a Break¶
If you are using the Lite SDK, Congratulations! You are done! You can stop reading this manual.
If you are using the Full SDK, please read on!
5. Rebuild the Serializer¶
If you are reading this, it means you are using the Scalable Server for online gaming. There was a lot of renaming in the Serializer, so you need to rebuild it for your game.
First remove the following files, they should be next to the folder containing your Unity project.
build_PlayRealSerializer.cmd
build_PlayRealSerializer.sh
PlayRealDTO/
PlayRealSampleDTO/
(if you didn’t use the examples before, it won’t be there)PlayRealDTOSerializer.sln
PlayRealSerializerGenerator/
The only folders left should be the one containing your Unity project and the one
containing the C# project for the serializable elements of your project (usually
called like your game’s name followed by DTO
).
Now extract the content of AsmodeeNet_v2.0.1_Serializer.zip
, and copy it in
the folder where you removed the previous files.
Now open Serializer.sln
, remove the project GameDTO
and add your own DTO
project. Make sure to replace any reference to PlayRealDTO
in there by a reference
to ScalableServerDTO
instead.
It’s time to rebuild all the assemblies. In Release mode, rebuild (in that order):
ScalableServerDTO
- your project’s DTO
SerializerGenerator
Now, depending on your development platform:
Windows: edit the script build_PlayRealSerializer.cmd
and override the paths
to YOUR_PROJECT_DTO
and to UNITY_PROJECT_FOLDER
. Then execute the script
in a PowerShell (or double-click it) to rebuild the .dll
files
needed by your project.
MacOS: rename the file default.env
into .env
. This is a config file that
specifies where to find Unity, where to find Mono, your project’s DTO, etc.
Override the values if necessary. Then run build_PlayRealSerializer.sh
.
6. Fix renaming errors¶
There may still be naming errors left in your code. Rename PlayRealSerializer
into AsmodeeNetSerializer
7. Enjoy!¶
You are done, enjoy this new SDK.