Skip to content

Commit 780ecf4

Browse files
committed
chore: Update gameframework dependency to version ^0.0.1 in Unity and Unreal pubspec.yaml files
This commit modifies the gameframework dependency in both Unity and Unreal Dart projects' pubspec.yaml files from a fixed version to a caret version (^0.0.1). This change allows for minor version updates while maintaining compatibility, ensuring that the projects can benefit from any future improvements or bug fixes in the gameframework package. Additionally, it includes a refactor of method names in the Unreal engine to improve clarity in logging and message handling.
1 parent bf1b022 commit 780ecf4

19 files changed

Lines changed: 2219 additions & 2557 deletions

File tree

engines/unity/dart/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ dependencies:
2424
sdk: flutter
2525
# For pub.dev release, use: gameframework: ^1.0.0
2626
# For development, use path:
27-
gameframework: 0.0.1
27+
gameframework: ^0.0.1
28+
# path: ../../../packages/gameframework
2829

2930
flutter:
3031
plugin:

engines/unreal/dart/android/src/main/kotlin/com/xraph/gameframework/unreal/FlutterBridgeRegistry.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ object FlutterBridgeRegistry {
250250
return false
251251
}
252252

253-
Log.d(TAG, "Controller found, forwarding to onUnrealMessage")
254-
controller.onUnrealMessage(target, method, data)
253+
Log.d(TAG, "Controller found, forwarding to onMessageFromUnreal")
254+
controller.onMessageFromUnreal(target, method, data)
255255
Log.d(TAG, "<<< Message forwarded successfully")
256256
return true
257257
}
@@ -273,7 +273,7 @@ object FlutterBridgeRegistry {
273273
return false
274274
}
275275

276-
controller.onUnrealMessage(target, method, data)
276+
controller.onMessageFromUnreal(target, method, data)
277277
return true
278278
}
279279

@@ -289,7 +289,9 @@ object FlutterBridgeRegistry {
289289
@JvmStatic
290290
fun sendBinaryToFlutter(target: String, method: String, data: String): Boolean {
291291
val controller = _sharedController ?: return false
292-
controller.onBinaryMessageFromUnreal(target, method, data)
292+
// Convert base64 string to ByteArray
293+
val byteData = android.util.Base64.decode(data, android.util.Base64.DEFAULT)
294+
controller.onBinaryMessageFromUnreal(target, method, byteData, false, 0)
293295
return true
294296
}
295297

0 commit comments

Comments
 (0)