Skip to content

Commit

Permalink
v1.3.0-beta updating to Godot 4.1.2 and SDK to v56
Browse files Browse the repository at this point in the history
  • Loading branch information
decacis committed Oct 7, 2023
1 parent c188105 commit 3e61bb4
Show file tree
Hide file tree
Showing 25 changed files with 967 additions and 43 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
branches: [ "main" ]

env:
OCULUS_VERSION: 53
GODOT_ENGINE_VERSION: "4.1.0"
OCULUS_VERSION: 56
GODOT_ENGINE_VERSION: "4.1.2"
GODOT_ENGINE_STAGE: "stable"
INTEGRATION_VERSION: "v1.2.2-beta"
INTEGRATION_VERSION: "v1.3.0-beta"

jobs:
lint:
Expand Down
Binary file not shown.
11 changes: 7 additions & 4 deletions demo/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ var initialized : bool = false

func _on_xr_started():
if not initialized:
initialized = true

# REPLACE APP ID!
GDOculusPlatform.initialize_android("6324217457624418")
var launch_details : Dictionary = GDOculusPlatform.application_get_launch_details()
print("Launch details: ", launch_details)
initialized = GDOculusPlatform.initialize_android("6324217457624418", { "disable_p2p_networking": true })

if initialized:
var launch_details : Dictionary = GDOculusPlatform.application_get_launch_details()
print("Launch details: ", launch_details)
else:
print("Unable to initialize Oculus Platform!")
2 changes: 2 additions & 0 deletions demo/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pose = &"aim"

[node name="LeftHand" parent="XROrigin3D/LeftHand" instance=ExtResource("2_xsrcq")]

[node name="FunctionPointer" parent="XROrigin3D/LeftHand" instance=ExtResource("4_07sh7")]

[node name="RightHand" type="XRController3D" parent="XROrigin3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0)
tracker = &"right_hand"
Expand Down
124 changes: 120 additions & 4 deletions demo/menu/menu.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
extends CanvasLayer

@export_group("Application")
@export var application_install_app_update_and_relaunch : Dictionary = {}

@export_group("User")
@export var get_user_val : String = ""
Expand Down Expand Up @@ -62,8 +64,23 @@ extends CanvasLayer
@export var grouppresence_launch_rejoin_dialog : Dictionary = {}
@export var grouppresence_launch_roster_panel : Dictionary = {}

@export_group("User Age Category")
@export var useragecategory_report : GDOculusPlatform.AppAgeCategory = GDOculusPlatform.APPAGECATEGORY_NON_CHILD


func _ready() -> void:

## SIGNALS
GDOculusPlatform.abuse_report_form_requested.connect(_handle_abuse_report_form_request)

GDOculusPlatform.assetfile_download_update.connect(_on_asset_file_update)
GDOculusPlatform.assetfile_download_finished.connect(_on_asset_file_downloaded)

## APPLICATION
if !application_install_app_update_and_relaunch.is_empty():
$PanelContainer/TabContainer/Application/VBoxContainer/InputFuncs/HFlowContainer/ApplicationInstallAppUpdateAndRelaunch.visible = true

## USER
if !get_user_val.is_empty():
$PanelContainer/TabContainer/User/VBoxContainer/InputFuncs/HFlowContainer/GetUser.visible = true
if !get_org_scoped_id_val.is_empty():
Expand Down Expand Up @@ -96,9 +113,6 @@ func _ready() -> void:
$PanelContainer/TabContainer/IAP/VBoxContainer/InputFuncs/HFlowContainer/IAPLaunchCheckoutFlow.visible = true

## ASSET FILES
GDOculusPlatform.assetfile_download_update.connect(_on_asset_file_update)
GDOculusPlatform.assetfile_download_finished.connect(_on_asset_file_downloaded)

if !assetfile_status_by_id.is_empty():
$PanelContainer/TabContainer/AssetFiles/VBoxContainer/InputFuncs/HFlowContainer/AssetfileStatusByID.visible = true
if !assetfile_status_by_name.is_empty():
Expand Down Expand Up @@ -169,6 +183,69 @@ func _ready() -> void:
$PanelContainer/TabContainer/GroupPresence/VBoxContainer/InputFuncs/HFlowContainer/GroupPresenceLaunchRejoinDialog.visible = true
if !grouppresence_launch_roster_panel.is_empty():
$PanelContainer/TabContainer/GroupPresence/VBoxContainer/InputFuncs/HFlowContainer/GroupPresenceLaunchRosterPanel.visible = true

## USER AGE CATEGORY
if useragecategory_report:
$PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/InputFuncs/HFlowContainer/UserAgeCategoryReport.visible = true


## USER - NO INPUT FUNCS
func _on_application_get_version_pressed():
print("-------------------------------------")
print("application_get_version CALLED")
GDOculusPlatform.application_get_version()\
.then(func(app_version_resp : Dictionary):
print("[application_get_version] RESPONSE: ", app_version_resp)
)\
.error(func(app_version_err):
push_error("[application_get_version] ERROR: ", app_version_err)
)

func _on_application_start_app_download_pressed():
print("-------------------------------------")
print("application_start_app_download CALLED")
GDOculusPlatform.application_start_app_download()\
.then(func(app_download_resp : int):
print("[application_start_app_download] RESPONSE: ", app_download_resp)
)\
.error(func(app_download_err):
push_error("[application_start_app_download] ERROR: ", app_download_err)
)

func _on_application_check_app_download_progress_pressed():
print("-------------------------------------")
print("application_check_app_download_progress CALLED")
GDOculusPlatform.application_check_app_download_progress()\
.then(func(app_download_prog_resp : Dictionary):
print("[application_check_app_download_progress] RESPONSE: ", app_download_prog_resp)
)\
.error(func(app_download_prog_err):
push_error("[application_check_app_download_progress] ERROR: ", app_download_prog_err)
)

func _on_application_cancel_app_download_pressed():
print("-------------------------------------")
print("application_cancel_app_download CALLED")
GDOculusPlatform.application_cancel_app_download()\
.then(func(app_download_cancel_resp : int):
print("[application_cancel_app_download] RESPONSE: ", app_download_cancel_resp)
)\
.error(func(app_download_cancel_err):
push_error("[application_cancel_app_download] ERROR: ", app_download_cancel_err)
)

## APPLICATION - INPUT FUNCS
func _on_application_install_app_update_and_relaunch_pressed():
print("-------------------------------------")
print("application_install_app_update_and_relaunch CALLED")
print("INPUT: ", application_install_app_update_and_relaunch)
GDOculusPlatform.application_install_app_update_and_relaunch(application_install_app_update_and_relaunch)\
.then(func(install_app_and_relaunch_resp : int):
print("[application_install_app_update_and_relaunch] RESPONSE: ", install_app_and_relaunch_resp)
)\
.error(func(install_app_and_relaunch_err):
push_error("[application_install_app_update_and_relaunch] ERROR: ", install_app_and_relaunch_err)
)


## USER - NO INPUT FUNCS
Expand Down Expand Up @@ -206,7 +283,6 @@ func _on_get_logged_in_user_pressed():
push_error("[user_get_logged_in_user] ERROR: ", get_user_err)
)


func _on_get_user_proof_pressed():
print("-------------------------------------")
print("user_get_user_proof CALLED")
Expand Down Expand Up @@ -993,3 +1069,43 @@ func _on_group_presence_launch_roster_panel_pressed():
.error(func(gp_launch_roster_err):
push_error("[grouppresence_launch_roster_panel] ERROR: ", gp_launch_roster_err)
)


## ABUSE REPORT
func _handle_abuse_report_form_request() -> void:
print("abuse_report_form_requested")

await get_tree().create_timer(1.0).timeout

GDOculusPlatform.abuse_report_request_handled(GDOculusPlatform.REPORT_REQUEST_UNHANDLED)\
.then(func(abuse_report_req_resp):
print("[abuse_report_request_handled] RESPONSE: ", abuse_report_req_resp)
)\
.error(func(abuse_report_req_err):
print("[abuse_report_request_handled] ERROR: ", abuse_report_req_err)
)


## USER AGE CATEGORY - NO INPUT FUNCS
func _on_useragecategory_get_pressed():
print("-------------------------------------")
print("useragecategory_get CALLED")
GDOculusPlatform.useragecategory_get()\
.then(func(useragecategory_get_resp : GDOculusPlatform.AccountAgeCategory):
print("[useragecategory_get] RESPONSE: ", useragecategory_get_resp)
)\
.error(func(useragecategory_get_err):
push_error("[useragecategory_get] ERROR: ", useragecategory_get_err)
)

## USER AGE CATEGORY - INPUT FUNCS
func _on_useragecategory_report_pressed():
print("-------------------------------------")
print("useragecategory_report CALLED")
GDOculusPlatform.useragecategory_get()\
.then(func(useragecategory_report_resp : bool):
print("[useragecategory_report] RESPONSE: ", useragecategory_report_resp)
)\
.error(func(useragecategory_report_err):
push_error("[useragecategory_report] ERROR: ", useragecategory_report_err)
)
118 changes: 117 additions & 1 deletion demo/menu/menu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ achievements_add_fields = {
}
achievements_unlock = "TEST_SIMPLE_ACHIEV_0"
achievements_get_definitions_by_name = Array[String](["TEST_BITFIELD_ACHIEV_0", "TEST_SIMPLE_ACHIEV_0"])
achievements_get_progress_by_name = Array[String](["TEST_COUNT_ACHIEV_0", "TEST_BITFIELD_ACHIEV_0"])
achievements_get_progress_by_name = Array[String](["TEST_COUNT_ACHIEV_0", "TEST_SIMPLE_ACHIEV_0"])
IAP_get_products_by_sku = Array[String](["test_consumable_0", "test_durable_0"])
IAP_consume_purchase = "test_consumable_0"
IAP_launch_checkout_flow = "test_durable_0"
Expand Down Expand Up @@ -125,7 +125,69 @@ offset_bottom = 40.0
[node name="TabContainer" type="TabContainer" parent="PanelContainer"]
layout_mode = 2

[node name="Application" type="MarginContainer" parent="PanelContainer/TabContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/TabContainer/Application"]
layout_mode = 2
theme_override_constants/separation = 20

[node name="NoInputFuncs" type="VBoxContainer" parent="PanelContainer/TabContainer/Application/VBoxContainer"]
layout_mode = 2

[node name="NoInputFuncsLbl" type="Label" parent="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs"]
layout_mode = 2
text = "No input functions:"

[node name="HFlowContainer" type="HFlowContainer" parent="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs"]
layout_mode = 2
theme_override_constants/h_separation = 5
theme_override_constants/v_separation = 5

[node name="ApplicationGetVersion" type="Button" parent="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer"]
layout_mode = 2
size_flags_horizontal = 4
text = "ApplicationGetVersion"

[node name="ApplicationStartAppDownload" type="Button" parent="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer"]
layout_mode = 2
size_flags_horizontal = 4
text = "ApplicationStartAppDownload"

[node name="ApplicationCheckAppDownloadProgress" type="Button" parent="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer"]
layout_mode = 2
size_flags_horizontal = 4
text = "ApplicationCheckAppDownloadProgress"

[node name="ApplicationCancelAppDownload" type="Button" parent="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer"]
layout_mode = 2
size_flags_horizontal = 4
text = "ApplicationCancelAppDownload"

[node name="InputFuncs" type="VBoxContainer" parent="PanelContainer/TabContainer/Application/VBoxContainer"]
layout_mode = 2

[node name="InputFuncsLbl" type="Label" parent="PanelContainer/TabContainer/Application/VBoxContainer/InputFuncs"]
layout_mode = 2
text = "Input functions:"

[node name="HFlowContainer" type="HFlowContainer" parent="PanelContainer/TabContainer/Application/VBoxContainer/InputFuncs"]
layout_mode = 2
theme_override_constants/h_separation = 5
theme_override_constants/v_separation = 5

[node name="ApplicationInstallAppUpdateAndRelaunch" type="Button" parent="PanelContainer/TabContainer/Application/VBoxContainer/InputFuncs/HFlowContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 4
text = "ApplicationInstallAppUpdateAndRelaunch"

[node name="User" type="MarginContainer" parent="PanelContainer/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
Expand Down Expand Up @@ -735,6 +797,58 @@ layout_mode = 2
size_flags_horizontal = 4
text = "GroupPresenceLaunchRosterPanel"

[node name="UserAgeCategory" type="MarginContainer" parent="PanelContainer/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10

[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/TabContainer/UserAgeCategory"]
layout_mode = 2
theme_override_constants/separation = 20

[node name="NoInputFuncs" type="VBoxContainer" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer"]
layout_mode = 2

[node name="NoInputFuncsLbl" type="Label" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/NoInputFuncs"]
layout_mode = 2
text = "No input functions:"

[node name="HFlowContainer" type="HFlowContainer" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/NoInputFuncs"]
layout_mode = 2
theme_override_constants/h_separation = 5
theme_override_constants/v_separation = 5

[node name="UserAgeCategoryGet" type="Button" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/NoInputFuncs/HFlowContainer"]
layout_mode = 2
size_flags_horizontal = 4
text = "UserAgeCategoryGet"

[node name="InputFuncs" type="VBoxContainer" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer"]
layout_mode = 2

[node name="InputFuncsLbl" type="Label" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/InputFuncs"]
layout_mode = 2
text = "Input functions:"

[node name="HFlowContainer" type="HFlowContainer" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/InputFuncs"]
layout_mode = 2
theme_override_constants/h_separation = 5
theme_override_constants/v_separation = 5

[node name="UserAgeCategoryReport" type="Button" parent="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/InputFuncs/HFlowContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 4
text = "UserAgeCategoryReport"

[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationGetVersion" to="." method="_on_application_get_version_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationStartAppDownload" to="." method="_on_application_start_app_download_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationCheckAppDownloadProgress" to="." method="_on_application_check_app_download_progress_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/NoInputFuncs/HFlowContainer/ApplicationCancelAppDownload" to="." method="_on_application_cancel_app_download_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/Application/VBoxContainer/InputFuncs/HFlowContainer/ApplicationInstallAppUpdateAndRelaunch" to="." method="_on_application_install_app_update_and_relaunch_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/User/VBoxContainer/NoInputFuncs/HFlowContainer/GetLoggedInUserID" to="." method="_on_get_logged_in_user_id_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/User/VBoxContainer/NoInputFuncs/HFlowContainer/GetLoggedInUserLocale" to="." method="_on_get_logged_in_user_locale_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/User/VBoxContainer/NoInputFuncs/HFlowContainer/GetIsViewerEntitled" to="." method="_on_get_is_viewer_entitled_pressed"]
Expand Down Expand Up @@ -797,3 +911,5 @@ text = "GroupPresenceLaunchRosterPanel"
[connection signal="pressed" from="PanelContainer/TabContainer/GroupPresence/VBoxContainer/InputFuncs/HFlowContainer/GroupPresenceLaunchMultiplayerErrDialog" to="." method="_on_group_presence_launch_multiplayer_err_dialog_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/GroupPresence/VBoxContainer/InputFuncs/HFlowContainer/GroupPresenceLaunchRejoinDialog" to="." method="_on_group_presence_launch_rejoin_dialog_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/GroupPresence/VBoxContainer/InputFuncs/HFlowContainer/GroupPresenceLaunchRosterPanel" to="." method="_on_group_presence_launch_roster_panel_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/NoInputFuncs/HFlowContainer/UserAgeCategoryGet" to="." method="_on_useragecategory_get_pressed"]
[connection signal="pressed" from="PanelContainer/TabContainer/UserAgeCategory/VBoxContainer/InputFuncs/HFlowContainer/UserAgeCategoryReport" to="." method="_on_useragecategory_report_pressed"]
Loading

0 comments on commit 3e61bb4

Please sign in to comment.