Skip to content

Commit db156e2

Browse files
authored
Merge pull request #10 from aosoft/update-interfaces
Update interfaces
2 parents 4ce1d58 + ee6a257 commit db156e2

File tree

16 files changed

+823
-597
lines changed

16 files changed

+823
-597
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ members = [
77
"unity-native-plugin-sample",
88
"unity-native-plugin-sample-profiler",
99
]
10+
resolver = "2"
11+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "unity-native-plugin-sample-profiler"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Yasuhiro Taniuchi"]
5-
edition = "2018"
5+
edition = "2021"
66
publish = false
77

88
[lib]
@@ -11,8 +11,8 @@ crate-type = ["cdylib"]
1111
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1212

1313
[dependencies]
14-
unity-native-plugin = { version = "0.6.0", path = "../unity-native-plugin", features = ["profiler_callbacks"] }
15-
unity-native-plugin-sys = { version = "0.6.0", path = "../unity-native-plugin-sys" }
14+
unity-native-plugin = { version = "0.7.0", path = "../unity-native-plugin", features = ["profiler_callbacks"] }
15+
unity-native-plugin-sys = { version = "0.7.0", path = "../unity-native-plugin-sys" }
1616
log = "0.4"
1717
env_logger = "0.8"
1818
flume = "0.10"

unity-native-plugin-sample/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "unity-native-plugin-sample"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Yasuhiro Taniuchi"]
5-
edition = "2018"
5+
edition = "2021"
66
publish = false
77

88
[lib]
@@ -11,10 +11,10 @@ crate-type = ["cdylib"]
1111
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1212

1313
[dependencies]
14-
unity-native-plugin = { version = "0.6.0", path = "../unity-native-plugin", features = ["d3d11", "d3d12", "profiler"] }
15-
unity-native-plugin-vulkan = { version = "0.6.0", path = "../unity-native-plugin-vulkan" }
14+
unity-native-plugin = { version = "0.7.0", path = "../unity-native-plugin", features = ["d3d11", "d3d12", "profiler"] }
15+
unity-native-plugin-vulkan = { version = "0.7.0", path = "../unity-native-plugin-vulkan" }
1616
winapi = { version = "0.3.9", features = ["winuser", "d3d11", "dxgiformat"] }
1717
wio = "0.2.2"
1818

1919
[dev-dependencies]
20-
unity-native-plugin-tester = { version = "0.6.0", path = "../unity-native-plugin-tester", features = ["d3d11"] }
20+
unity-native-plugin-tester = { version = "0.7.0", path = "../unity-native-plugin-tester", features = ["d3d11"] }

unity-native-plugin-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "unity-native-plugin-sys"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Yasuhiro Taniuchi"]
5-
edition = "2018"
5+
edition = "2021"
66
license = "MIT"
77
description = "unity-native-plugin-sys"
88
homepage = "https://github.com/aosoft/unity-native-plugin-rs"

unity-native-plugin-tester/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "unity-native-plugin-tester"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Yasuhiro Taniuchi"]
5-
edition = "2018"
5+
edition = "2021"
66
license = "MIT"
77
description = "Unity Native Plugin API Tester Library"
88
homepage = "https://github.com/aosoft/unity-native-plugin-rs"
@@ -25,8 +25,8 @@ d3d11 = []
2525
d3d12 = []
2626

2727
[dependencies]
28-
unity-native-plugin-sys = { version = "0.6.0", path = "../unity-native-plugin-sys" }
29-
unity-native-plugin = { version = "0.6.0", path = "../unity-native-plugin", features = ["d3d11", "d3d12"] }
28+
unity-native-plugin-sys = { version = "0.7.0", path = "../unity-native-plugin-sys" }
29+
unity-native-plugin = { version = "0.7.0", path = "../unity-native-plugin", features = ["d3d11", "d3d12"] }
3030
winapi = { version = "0.3.9", features = ["winuser", "dxgi", "d3d11", "dxgiformat", "dxgitype", "d3dcommon"] }
3131
winit = "0.23.0"
3232
wio = "0.2.2"

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,20 @@ extern "system" fn register_interface_split(
114114
}
115115

116116
pub unsafe fn get_unity_interfaces() -> &'static mut TesterContextInterfaces {
117-
UNITY_INTERFACES.as_mut().unwrap()
117+
unsafe {
118+
UNITY_INTERFACES.as_mut().unwrap()
119+
}
118120
}
119121

120122
pub unsafe fn get_unity_interface<T: UnityInterfaceBase + UnityInterfaceID>() -> &'static T {
121-
get_unity_interfaces()
122-
.get_interface(T::get_interface_guid())
123-
.unwrap()
124-
.as_any()
125-
.downcast_ref::<T>()
126-
.unwrap()
123+
unsafe {
124+
get_unity_interfaces()
125+
.get_interface(T::get_interface_guid())
126+
.unwrap()
127+
.as_any()
128+
.downcast_ref::<T>()
129+
.unwrap()
130+
}
127131
}
128132

129133
pub fn initialize_unity_interfaces() {

unity-native-plugin-vulkan/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "unity-native-plugin-vulkan"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Yasuhiro Taniuchi"]
55
license = "MIT"
66
description = "Unity Native Plugin API (Vulkan) for Rust"
@@ -9,7 +9,7 @@ repository = "https://github.com/aosoft/unity-native-plugin-rs"
99
readme = "README.md"
1010
categories = ["api-bindings", "game-engines"]
1111
keywords = ["unity"]
12-
edition = "2018"
12+
edition = "2021"
1313
include = [
1414
"**/*.rs",
1515
"Cargo.toml",
@@ -19,6 +19,6 @@ include = [
1919
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2020

2121
[dependencies]
22-
unity-native-plugin = { version = "0.6.0", path = "../unity-native-plugin" }
23-
unity-native-plugin-sys = { version = "0.6.0", path = "../unity-native-plugin-sys" }
22+
unity-native-plugin = { version = "0.7.0", path = "../unity-native-plugin" }
23+
unity-native-plugin-sys = { version = "0.7.0", path = "../unity-native-plugin-sys" }
2424
ash = "0.38.0+1.3.281.1"

0 commit comments

Comments
 (0)