Hi all,
Anyone else who wants to try to use this example, here's how you upgrade it to the latest version of Unity.
First, to get it working as-is:Download unity hub then import the project.
You'll get a warning that it's not a supported version. 2017.3.1 is only available in the archive.
Download 2017.3.1 from:
https://unity3d.com/get-unity/download/archiveThere's a button to install it in Unity.
Now, in Unity confirm the project opens and runs as expected.
To upgrade:In Unity Hub there's a
version column. Click the arrow next to this project and select the latest Unity.
You will be met with several errors.
MDJPostProcessor.cs has a few legacy parts that are now deprecated.
Code:
PrefabUtility.ReplacePrefab (go, prefab, ReplacePrefabOptions.ConnectToPrefab);
Replace this with:
Code:
PrefabUtility.SaveAsPrefabAssetAndConnect(go, outputAssetPrefabPath, InteractionMode.AutomatedAction);
You need to do this in two places. Line 429 and line 613.
This actually does 2 steps in one and gets rid of the need to create an empty prefab, which is also something that will give your next warning. You don't need to create the empty prefab anymore.
Comment out this part:
Code:
//var prefab = PrefabUtility.CreateEmptyPrefab (outputAssetPrefabPath);
You need to do this in two places. Near lines 415 and 596.
The final error you may get is with a package included. At least I did. If you have any errors like:
Code:
Error: Copying assembly from 'Temp/<something>.dll' to 'Library/ScriptAssemb
Go to window->package manager and either remove/reimport the package, or try upgrading the package. Upgrading the package worked for me.
p.s.
I would put this up in source control/github but I don't feel comfortable doing that. If someone else goes through these steps and wants to put it on github feel free!
I feel weird that this project does not exist publicly on Karl's github, it seems like a private project that was leaked.