Skip to content

Commit 49af744

Browse files
committed
Update document
1 parent 056847e commit 49af744

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

unity-native-plugin-tester/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ fn test() {
3939
* (b) Initialize function
4040
* (c) Test code function
4141
* (d) Finalize function
42-
* (e) "unity_plugin_load" method (Defined by the unity_native_plugin_entry_point macro)
43-
* (f) "unity_plugin_unload" method (Defined by the unity_native_plugin_entry_point macro)
42+
* (e) "unity_plugin_load" function (Defined by the unity_native_plugin_entry_point macro)
43+
* (f) "unity_plugin_unload" function (Defined by the unity_native_plugin_entry_point macro)
4444

4545
* Run the test
4646
```

unity-native-plugin-tester/src/d3d11.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,28 @@ extern "system" fn srv_from_native_texture(
254254
}
255255
}
256256

257+
/// Running tests for D3D11.
258+
///
259+
/// * 'TestContextGraphicsD3D11' manages the resources used for testing.
260+
/// * Implement test initialization in the 'fn_init' function.
261+
/// * Set the resource settings for the context.
262+
/// * Implement the test in the 'fn_main' function.
263+
/// * Drawing to 'TestContextGraphicsD3D11::back_buffer()' is displayed in a window.
264+
/// * Returns whether to continue with 'fn_main'.
265+
/// * Implement the finalization process with 'fn_finalize'.
266+
/// * The 'fn_unity_plugin_load' and 'fn_unity_plugin_unload'
267+
/// specify the loading and unloading functions of the plugins specified
268+
/// by the unity_native_plugin_entry_point macro.
269+
///
270+
/// # Arguments
271+
///
272+
/// * `client_size` - Size of the client area (back buffer)
273+
/// * `fn_init` - Initialize function
274+
/// * `fn_main` - Test code function
275+
/// * `fn_finalize` - Finalize function
276+
/// * `fn_unity_plugin_load` - "unity_plugin_load" function (Defined by the unity_native_plugin_entry_point macro)
277+
/// * `fn_unity_plugin_unload` - "unity_plugin_unload" function (Defined by the unity_native_plugin_entry_point macro)
278+
///
257279
pub fn test_plugin_d3d11<
258280
FnInit: FnOnce(&Window, &mut TesterContextGraphicsD3D11),
259281
FnMain: FnMut(&Window, &TesterContextGraphicsD3D11) -> crate::window::LoopResult,

0 commit comments

Comments
 (0)