Skip to content

Commit 1072f78

Browse files
committed
README.md update in regard to release 4.0
1 parent 792b482 commit 1072f78

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# UnityNativeTool
2-
Tool designed mainly to solve old problem with unloading native plugins without reopening Unity editor, with vary little changes to code base and low overhead. It enables to replace plugin files between game executions or even while playing.
2+
Tool designed mainly to solve old problem with unloading native plugins without reopening Unity editor; with vary little changes to code base and low overhead. It enables to replace plugin files between game executions or even while playing.
33
Doing so involves mocking original native method calls with these made to manually loaded libraries by P/Invokes. Although works in builded game, it's intended to use in edtior.
44

5+
## Systems
6+
- Windows
7+
- Linux
8+
- Mac (not tested)
9+
510
## Requirements and dependencies
6-
- Windows or Linux
711
- [Harmony](https://github.com/pardeike/Harmony) (already included in release package)
812
- Api Compatibility Level >= .NET 4.x
913

@@ -20,11 +24,11 @@ Tested on old gaming laptop, Windows 10, 2 plugins with 10 functions each. Targe
2024
| Without this tool | ~70ms |
2125
| Lazy mode | ~135ms |
2226
| Preload mode | ~105ms |
23-
| With thread safety | ~300ms |
27+
| With thread safety* | ~300ms |
2428

2529
*With uncontended locks.
2630
## Instalation
27-
1. Download and add unity package from releases.
31+
1. Download and add unity package from [releases](https://github.com/MCpiroman/UnityNativeTool/releases).
2832

2933
2. Set _Api Compatibility Level_ to .NET 4.x or above.
3034
Edit > Project Settings > Player > Other Settings > Api Compatibility Level
@@ -47,11 +51,11 @@ All plugins under controll of this tool will be unloaded once game stops. To unl
4751

4852
#### __Options__
4953
These options are editable via `DllManipulator` script.
50-
* __DLL path pattern__ - Path at which mocked plugin files are located. Default is *Assets/Plugins/\__NameOfPlugin[.dll|.so]*. Can be the same as path that Unity uses for plugins.
54+
* __DLL path pattern__ - Path at which mocked plugin files are located. Default is *Assets/Plugins/\__NameOfPlugin[.dll|.so|.dylib]*. Can be the same as path that Unity uses for plugins.
5155
* __DLL loading mode__ - Specifies how DLLs and functions will be loaded.
5256
+ _Lazy_ - All DLLs and functions are loaded as they're first called. This allows them to be easily unloaded and loaded within game execution.
5357
+ _Preloaded_ - Slight preformance benefit over _Lazy_ mode. All DLLs and functions are loaded at startup. Calls to unloaded DLLs lead to crash, so mid-execution it's safest to manipulate DLLs if game is paused.
54-
* __[Linux only] dlopen flags__ - Flags used in dlopen() P/Invoke on Linux systems. Has minor meaning unless library is large.
58+
* __dlopen flags [Linux and Mac only]__ - Flags used in dlopen() P/Invoke on Linux and OSX systems. Has minor meaning unless library is large.
5559
* __Thread safe__ - When true, ensures synchronization required for native calls from any other than Unity main thread. Overhead might be few times higher, with uncontended locks. Available only in Preloaded mode.
5660
* __Mock all native functions__ - If true, all native functions in current assembly will be mocked.
5761
* __Mock native calls in all types__ - If true, calls of native funcions in all methods in current assembly will be mocked. This however can cause significant preformance issues at startup in big code base.
@@ -126,6 +130,5 @@ class AllInOne : MonoBehaviour
126130
- Native calls inlining
127131
- Improved interthread synchronization
128132
- Pausing on dll/function load error, allowing to fix depencency without restarting game
129-
- Mac support
130133
- Possibly break depencency on Harmony
131-
- Better names
134+
- Better names

0 commit comments

Comments
 (0)