generated from ArcPh1r3/HenryTutorial
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathweave.bat
More file actions
23 lines (18 loc) · 1.14 KB
/
weave.bat
File metadata and controls
23 lines (18 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
REM original version https://github.com/risk-of-thunder/R2Wiki/wiki/Networking-with-Weaver:-The-Unity-Way
REM open this in vs it'll be so much nicer
set TargetFileName=JoeMod.dll
set TargetDir=bin\Debug\netstandard2.0
REM robocopy to our weaver folder. idk what the fuck robocopy does but we leave one there for storage
robocopy %TargetDir% Weaver %TargetFileName% > %TargetDir%\Robocopy
REM rename our original build to prepatch
IF EXIST %TargetDir%\%TargetFileName%.prepatch (
DEL /F %TargetDir%\%TargetFileName%.prepatch
)
ren %TargetDir%\%TargetFileName% %TargetFileName%.prepatch
REM le epic networking patch
REM Unity.UNetWeaver.exe {path to Coremodule} {Path Networking} {output path} {Path to patching dll} {Path to all needed references for the to-be-patched dll}
Weaver\Unity.UNetWeaver.exe ..\libs\UnityEngine.CoreModule.dll ..\libs\com.unity.multiplayer-hlapi.Runtime.dll %TargetDir%\ Weaver\%TargetFileName% ..\libs
del Weaver\%TargetFileName%
del %TargetDir%\Robocopy
REM that's it. This is meant to pretend we just built a dll like any other time except this one is networked
REM add your postbuilds in vs like it's any other project