Skip to content

Commit a82249c

Browse files
authored
Update README.md
1 parent aa7356d commit a82249c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
## Preparing mods for patching
1616
- Make sure Debug Symbols are set to `Portable` or `Embedded` and not `Full`.
1717
- To ensure that the patched NetworkBehaviours are initialized properly, add the following code snippet to your mod, in a place where it will only run once, such as `Awake()`
18-
- **It is very important that it only runs once!**
19-
- If you have soft dependencies of some kind, you might need to wrap this in a try catch block.
18+
- **It is very important that it only runs once!**
19+
- If you have soft dependencies of some kind, you might need to wrap this in a try catch block.
2020
```cs
2121
var types = Assembly.GetExecutingAssembly().GetTypes();
2222
foreach (var type in types)
@@ -33,7 +33,7 @@
3333
}
3434
```
3535

36-
- The reason we need to do this is because NetcodePatcher generates methods marked with `[RuntimeInitializeOnLoadMethod]` for initializing the RPCs, which normally get ran when the class gets loaded.
36+
- The reason we need to do this is because NetcodePatcher generates methods marked with `[RuntimeInitializeOnLoadMethod]` for initializing the RPCs, which normally get ran when the class gets loaded.
3737
However because the mod assembly is not managed by unity, these methods will not be ran automatically.
3838
So using this snippet we manually run every method marked with `[RuntimeInitializeOnLoadMethodAttribute]`.
3939
- Make you register any custom NetworkObject prefabs with the unity NetworkManager.

0 commit comments

Comments
 (0)