Edit D2R preset environments in Unity. A purchased copy of D2R is required to access the data files.
(Recommended: intro video about Unity's layout, panels and terminology https://youtu.be/pwZpJzpE2lQ?t=71)
...Unity Projects/D2R-docktown/Assets/Scripts , Resources, libs, ...
)Main Camera
object in the Hierarchy. Then in the Inspector
window on the right hand side add a component script Scripts/SaveJson.cs
. (This is done only once per project)ctrl+s
. Set your D2R data paths in SaveJson.cs
and save the script see belowScene
window to load a json preset in the project folder (e.g. docktown3.json
). Click "Pause" and move/rotate/scale objects in the Scene-direct -txt
A video showing act1 edits: https://streamable.com/xbxe7i
If you see errors like
Assets\Scripts\SaveJson.cs(9,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Assets\Scripts\SaveJson.cs(10,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Then the Newtonsoft
package needs to be installed in Unity. Install through Unity's Package Manager: in Unity’s top menu: Window > Package Manager > Search for package Newtonsoft
. https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.1/manual/index.html
Thanks to MilesTeg
from d2mods.info for pointing this out.
Lines 16 and 17 in SaveJson.cs
should be configured for your preset path and D2R data path
public string preset = "docktown3.json"; // Change this to be the json preset that is edited
public static string d2rDataPath = "D:/D2R/"; // Change this to where your D2R data is extracted (casc storage)
Freely available here https://store.unity.com/download-nuo
Diablo II and Diablo II: Resurrected are copyrighted by Blizzard Entertainment, Inc. All rights reserved. Diablo II, Diablo II: Resurrected and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.
All trademarks referenced here are the properties of their respective owners.
This project and its maintainers are not associated with or endorsed by Blizzard Entertainment, Inc.