Unreal
Hive SDK Unreal Engine 提供以下步驟來配置促銷功能。
添加功能¶
- 在 Unreal Editor 菜单中,点击 编辑 > 项目设置。项目设置窗口将出现。
-
在项目设置窗口的左侧面板中,点击 依赖 – Android / 依赖 – iOS,位于 Hive SDK 下。
-
在 Hive 模組 下,選擇 啟用 HivePromotion。必須勾選 啟用 HivePromotion 才能在 Unreal Android 環境中使用 Google InApp Review。
設定通用連結¶
通用連結用於通過邀請頁面進行應用程序的初始安裝和執行,以及邀請者獎勵。
Note
有關基於通用連結生成邀請者連結的其他控制台設置,請參閱開發者網站上的促銷操作指南。
在Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSExport.cs文件中添加位于 'Add'
和 'Add End'
之间的行。
Text.AppendLine( "<dict>");
Text.AppendLine( "\t<key>get-task-allow</key>");
Text.AppendLine(string.Format( "\t<{0}/>", bForDistribution ? "false": "true"));
// 添加
Text.AppendLine( "\t<key>com.apple.developer.associated-domains</key>");
Text.AppendLine( "\t<array>");
/*
根據通用鏈接添加邀請者鏈接
以下是 Hive SDK 示例应用程序中使用的示例。
Text.AppendLine("\t\t<string>applinks:hiveota.withhive.com</string>");
Text.AppendLine("\t\t<string>applinks:dev-promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:sandbox-promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:test-promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:direct-link.withhive.com</string>");
Text.AppendLine("\t\t<string>applinks:sandbox-direct-link.withhive.com</string>");
Text.AppendLine("\t\t<string>applinks:test-direct-link.withhive.com</string>");
*/
Text.AppendLine( "\t</array>");
/* 此項目是必須在 iOS 17 或更高版本上登錄遊戲中心。
Text.AppendLine("\t<key>com.apple.developer.game-center</key>");
Text.AppendLine("\t<true/>");
*/
// 添加结束
if (bCloudKitSupported) {
if (iCloudContainerIdentifiersXML != ""
Text.AppendLine( "<dict>");
Text.AppendLine( "\t<key>get-task-allow</key>");
Text.AppendLine(string.Format( "\t<{0}/>", bForDistribution ? "false": "true"));
// 添加
Text.AppendLine( "\t<key>com.apple.developer.associated-domains</key>");
Text.AppendLine( "\t<array>");
/*
根據通用鏈接添加邀請鏈接
以下是 Hive SDK 示例应用中使用的示例。
Text.AppendLine("\t\t<string>applinks:hiveota.withhive.com</string>");
Text.AppendLine("\t\t<string>applinks:dev-promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:sandbox-promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:test-promotion.qpyou.cn</string>");
Text.AppendLine("\t\t<string>applinks:direct-link.withhive.com</string>");
Text.AppendLine("\t\t<string>applinks:sandbox-direct-link.withhive.com</string>");
Text.AppendLine("\t\t<string>applinks:test-direct-link.withhive.com</string>");
*/
Text.AppendLine( "\t</array>");
// 添加结束
if (bCloudKitSupported) {
if (iCloudContainerIdentifiersXML != "")