You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ Tool created mainly to solve old problem with reloading [native plugins](https:/
34
34
- If something is not working, first check out available options (and read their descriptions), then [report an issue](https://github.com/mcpiroman/UnityNativeTool/issues/new).
35
35
- Options are accessible via `DllManipulatorScript` editor or window.
36
36
- Although this tool presumably works in built game, it's intended to be used in editor.
37
+
- Get callbacks in C# when the dll load state has changed with attributes like `[NativeDllLoadedTrigger]`, see `Attributes.cs` for more information
38
+
- Unload and load all DLLs via shortcut `Alt+D` and `Alt+Shfit+D` respectively. Editable in the Shortcut Manager for 2019.1+
37
39
38
40
## Limitations
39
41
- Marshaling parameter attributes other than `[MarshalAs]`, `[In]` and `[Out]` are not supported.
Debug.LogError($"Trigger method must either take no parameters or one parameter of type {nameof(NativeDll)}. Violation on method {method.Name} in {method.DeclaringType.FullName}");
140
+
Debug.LogError($"Trigger method must either take no parameters, one parameter of type {nameof(NativeDll)} or one of type {nameof(NativeDll)} and one int. "+
141
+
$"See the TriggerAttribute for more details. Violation on method {method.Name} in {method.DeclaringType.FullName}");
126
142
}
127
143
}
128
144
@@ -142,6 +158,11 @@ public static void LoadAll()
142
158
{
143
159
LoadTargetFunction(nativeFunction,false);
144
160
}
161
+
162
+
// Notify that the dll and its functions have been loaded in preload mode
163
+
// This here allows use of native functions in the triggers
//On Preloaded mode this leads to NullReferenceException, but on Lazy mode the DLL and function would be just reloaded so we would up with loaded DLL after game exit.
94
126
//Thankfully thread safety with Lazy mode is not implemented yet.
95
127
96
-
DllManipulator.UnloadAll();
97
-
DllManipulator.ForgetAllDlls();
98
-
DllManipulator.ClearCrashLogs();
128
+
if(DllManipulator.Options!=null)// Check that we have initialized
0 commit comments