-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
106 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule godot
updated
2793 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
# Godot iOS ARKit plugin | ||
|
||
Uses Godot's `XRInterface`/`ARVRInterface` to handle iOS AR functionality. | ||
Uses Godot's `XRInterface`/`ARVRInterface` to handle iOS AR functionality. | ||
|
||
## Example | ||
|
||
https://github.com/BastiaanOlij/godot3_test_projects/tree/master/ARKit | ||
|
||
## Methods | ||
|
||
`set_light_estimation_is_enabled(bool flag)` - Sets a value responsible for usage of estimation of lighting conditions based on the camera image. | ||
`get_light_estimation_is_enabled()` - Returns a value responsible for usage of estimation of lighting conditions based on the camera image. | ||
`get_ambient_intensity()` - Returns a value used for intensity, in lumens, of ambient light throughout the scene. | ||
`get_ambient_color_temperature()` - Return a value used for color temperature of ambient light throughout the scene. | ||
`raycast(Vector2 screen_coords)` - Performs a raycast to search for real-world objects or AR anchors in the captured camera image. | ||
`raycast(Vector2 screen_coords)` - Performs a raycast to search for real-world objects or AR anchors in the captured camera image. | ||
|
||
## Properties | ||
|
||
`light_estimation: bool` - Returns or sets a value responsible for usage of estimation of lighting conditions based on the camera image. | ||
`light_estimation: bool` - Returns or sets a value responsible for usage of estimation of lighting conditions based on the camera image. | ||
|
||
## Events reporting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,61 @@ | ||
# Godot iOS InAppStore plugin | ||
|
||
To use this plugin you will have to manually setup Apple's App Store Purchases for your project at [Apple developer console](https://appstoreconnect.apple.com). For more information follow official Apple documentation: [StoreKit documentation](https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase), [App Store Connect Help](https://help.apple.com/app-store-connect/) | ||
|
||
## Example | ||
|
||
``` | ||
var _appstore = null | ||
func check_events(): | ||
while _appstore.get_pending_event_count() > 0: | ||
var event = inappstore.pop_pending_event() | ||
match event.type: | ||
'product_info': | ||
... | ||
'purchase': | ||
... | ||
'restore': | ||
... | ||
func _on_Button_button_down(): | ||
var result = _appstore.restore_purchases() | ||
... | ||
var result = _appstore.purchase({'product_id': "product_1"}) | ||
... | ||
... | ||
func _ready(): | ||
if Engine.has_singleton("InAppStore"): | ||
_appstore = Engine.get_singleton('InAppStore') | ||
var result = _appstore.request_product_info( { "product_ids": ["product_1", "product_2"] } ) | ||
if result == OK: | ||
print("Successfully started product info request") | ||
_appstore.set_auto_finish_transaction(true) | ||
var timer = Timer.new() | ||
timer.wait_time = 1 | ||
timer.connect("timeout", self, 'check_events') | ||
add_child(timer) | ||
timer.start() | ||
else: | ||
print("failed requesting product info") | ||
else: | ||
print("no app store plugin") | ||
``` | ||
|
||
## Methods | ||
|
||
`request_product_info(Dictionary products_dictionary)` - Loads the unique identifiers for your in-app products in order to retrieve products information. Generates new event with `product_info` type. | ||
`request_product_info(Dictionary products_dictionary)` - Loads the unique identifiers for your in-app products in order to retrieve products information. Generates new event with `product_info` type. Identifiers should be the same as the ones used to setup your App Store purchases. | ||
`restore_purchases()` - Asks App Store payment queue to restore previously completed purchases. Generates new event with `restore` type. | ||
`purchase(Dictionary product_dictionary)` - Adds a product payment request to the App Store payment queue. Generates new event with `purchase` type. | ||
`set_auto_finish_transaction(bool flag)` - Sets a value responsible for enabling automatic transaction finishing. | ||
`finish_transaction(String product_id)` - Notifies the App Store that the app finished processing the transaction. | ||
`finish_transaction(String product_id)` - Notifies the App Store that the app finished processing the transaction. | ||
|
||
## Properties | ||
|
||
## Events reporting | ||
|
||
`get_pending_event_count()` - Returns number of events pending from plugin to be processed. | ||
`pop_pending_event()` - Returns first unprocessed plugin event. | ||
`pop_pending_event()` - Returns first unprocessed plugin event. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters