1 Commits

Author SHA1 Message Date
JSD\13999
1db5db6a77 video plugins 2026-03-24 11:43:22 +08:00
184 changed files with 28544 additions and 4567 deletions

4
.gitignore vendored
View File

@@ -5,7 +5,3 @@ sdk-intergration/.vscode
sdk-intergration/'
sdk-intergration/Assets/.claude/settings.json
sdk-intergration/.idea
.worktrees/*
.docs/*
.claude/*

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arkgame.ft.flexion"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application android:extractNativeLibs="true" android:name="com.unity3d.player.TYApp"
tools:replace="android:usesCleartextTraffic,android:fullBackupContent"
android:fullBackupContent="@xml/flexion_backup_rules"
android:usesCleartextTraffic="true">
<activity android:name="com.unity3d.player.TYUnityActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="fishingtraveliae.onelink.me" android:pathPrefix="/jT1Q"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="mainactivity" android:scheme="zzft" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<!-- 渠道标识ChannelManager 读取此值以识别 Flexion 渠道 -->
<meta-data android:name="CHANNEL" android:value="Flexion" />
<!-- 覆盖 gasdk 与 tuyoosdk 的 MainProcessName 冲突 -->
<meta-data android:name="com.sensorsdata.analytics.android.MainProcessName"
android:value="${applicationId}"
tools:replace="android:value" />
<!-- Flexion SDK 应用标识,从 DropPoint 获取 -->
<meta-data android:name="com.flexionmobile.fdk.apptoken" android:value="fishingtravel" />
<!-- 告知 Flexion SDK 当前为 Unity 项目,必须声明 -->
<meta-data android:name="com.flexionmobile.fdk.sdk-type" android:value="unity" />
<!--
覆盖 tuyoosdk AAR 中硬编码的 Facebook ContentProvider authority。
AAR 原值com.facebook.app.FacebookContentProvider162066986963808
追加 ${applicationId}Flexion 包名)作为后缀后,与 GP 版 authority 不同,
两个渠道包可同时安装在同一设备上,不会触发 INSTALL_FAILED_CONFLICTING_PROVIDER。
参考Flexion 官方文档《Unique package name - follow-on requirements》
-->
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider162066986963808.${applicationId}"
android:exported="true"
tools:replace="android:authorities" />
</application>
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
</queries>
</manifest>

View File

@@ -1,20 +0,0 @@
package com.unity3d.player;
public class ChannelEntry {
public static final String CHANNEL = "Flexion";
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
return new FlexionSDKAdapter();
}
// Flexion provides price in micros and currency code, so no normalization needed
// 支付的变化,可能会修改这里
public static String normalizeSkuList(String msg) {
return msg;
}
//public SDKExtBuilder;
}

View File

@@ -1,29 +0,0 @@
package com.unity3d.player;
public class ConfigManager {
// Common SDK parameters
public static int SDK_APPID = 20587;
public static String SDK_GAMEID = "20587";
public static String SDK_PROJECTID = "20587";
public static String SDK_CLOUDID = "128";
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.flexion.FishingMaster";
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
// FCM (anti-addiction system)
public static String FCM_NAMESPACE = "128";
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
// Unity Facade callback names
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
}

View File

@@ -1,100 +0,0 @@
{
"project_info": {
"project_number": "481260393117",
"project_id": "fishing-travel",
"storage_bucket": "fishing-travel.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:481260393117:android:4e8da50d0ee3b5c207fa74",
"android_client_info": {
"package_name": "com.arkgame.ft"
}
},
"oauth_client": [
{
"client_id": "481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.arkgame.ft",
"certificate_hash": "c9cf2f5eaba383cbdd5b968d0342c49afabc32a2"
}
},
{
"client_id": "481260393117-vfn1jueugjqjach8kgc0kfi54g085q6l.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.arkgame.ft",
"certificate_hash": "53fd6ff623712411792a4665163e4cbf4a7a22ec"
}
},
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.arkgame.ft",
"app_store_id": "6505145935"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:481260393117:android:eafec4a060b0224907fa74",
"android_client_info": {
"package_name": "com.arkgame.ft.flexion"
}
},
"oauth_client": [
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.arkgame.ft",
"app_store_id": "6505145935"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -1,493 +0,0 @@
package com.unity3d.player;
import android.app.Activity;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.flexionmobile.ddpx.listener.ConnectionStateListener;
import com.flexionmobile.ddpx.listener.PurchasesUpdateListener;
import com.flexionmobile.ddpx.model.BillingResult;
import com.flexionmobile.ddpx.model.BillingResults;
import com.flexionmobile.ddpx.model.Purchase;
import com.flexionmobile.ddpx.model.ProductDetails;
import com.flexionmobile.ddpx.model.params.BillingFlowParams;
import com.flexionmobile.ddpx.model.params.ConsumeParams;
import com.flexionmobile.ddpx.model.params.QueryPurchasesParams;
import com.flexionmobile.ddpx.model.params.ProductDetailsParams;
import com.flexionmobile.ddpx.service.BillingService;
import com.flexionmobile.fdk.FLX;
import com.tuyoo.gamesdk.api.SDKAPI;
import com.tuyoo.gamesdk.model.InitParam;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class FlexionSDKAdapter implements
SDKManager.IChannelSDKAdapter,
SDKManager.IPaymentAdapter,
SDKManager.IProductQueryAdapter,
SDKManager.IPendingPurchaseAdapter,
SDKManager.IBillingLifecycleAdapter {
private static final String TAG = "FlexionSDKAdapter";
private static BillingService billingService;
private static boolean billingConnected = false;
private static boolean billingConnecting = false;
private static Activity billingActivity;
private static final Handler mainHandler = new Handler(Looper.getMainLooper());
private static final List<String> pendingPurchases = new ArrayList<>();
private static final List<PendingBillingOperation> pendingBillingOperations = new ArrayList<>();
private static final ExecutorService billingExecutor = Executors.newSingleThreadExecutor(r -> new Thread(r, "FlexionBillingThread"));
private interface BillingReadyOperation {
void run(BillingService service);
}
private static class PendingBillingOperation {
final String operation;
final BillingReadyOperation onReady;
final Runnable onFail;
PendingBillingOperation(String operation, BillingReadyOperation onReady, Runnable onFail) {
this.operation = operation;
this.onReady = onReady;
this.onFail = onFail;
}
}
private static final PurchasesUpdateListener purchasesListener = (billingResult, purchase) -> {
Log.w(TAG, "[PAY-FLOW] PurchasesUpdateListener: code=" + billingResult.getResponseCode()
+ " hasPurchase=" + (purchase != null));
if (billingResult.getResponseCode() == BillingResults.ResultCode.PURCHASE_SUCCESS_CODE) {
if (purchase != null) handlePurchase(purchase);
} else if (billingResult.getResponseCode() == BillingResults.ResultCode.PURCHASE_USER_CANCELLED_CODE) {
Log.i(TAG, "[PAY-FLOW] user cancelled");
sendPayCallback(1, "user_cancelled", null, null, null, null);
} else {
Log.e(TAG, "[PAY-FLOW] purchase failed: code=" + billingResult.getResponseCode());
sendPayCallback(1, "purchase_failed_" + billingResult.getResponseCode(), null, null, null, null);
}
};
@Override
public void init(Activity activity) {
activity.runOnUiThread(() -> {
SDKAPI.getIns().lightModeEnable();
boolean sdkInitOk = false;
try {
SDKAPI.getIns().init(new InitParam.Builder()
.withActivity(activity)
.withAppId(ConfigManager.SDK_APPID)
.withClientId(ConfigManager.SDK_CLIENTID)
.withServerUrl(ConfigManager.SDK_LOGIN_SERVER_URL)
.build());
SDKAPI.getIns().onActivityStart(activity);
SDKAPI.getIns().onActivityResume(activity);
sdkInitOk = true;
} catch (Exception e) {
Log.e(TAG, "TuYoo SDK init failed, skip FLX init: " + e);
TYUnityActivity.setSdkInited();
SDKManager.notifyInitResult(false, "tuyoo_init_failed: " + e.getMessage());
}
if (sdkInitOk) {
FLX.init(activity, (initCode, initMsg) -> {
Log.i(TAG, "FLX.init result=" + initCode);
if (initCode == 0) {
FLX.showFlexionScreens(activity, (screenCode, screenMsg) -> {
Log.i(TAG, "FLX.showFlexionScreens result=" + screenCode);
initBillingService(activity);
TYUnityActivity.setSdkInited();
SDKManager.notifyInitResult(true, "ok");
});
} else {
Log.e(TAG, "FLX.init failed: " + initCode);
TYUnityActivity.setSdkInited();
SDKManager.notifyInitResult(false, "flx_init_failed: " + initCode);
}
});
}
});
}
@Override
public void pay(Activity activity, String productId, String productPrice,
String productName, String productCount, String prodorderId,
String appInfo) {
Log.i(TAG, "[PAY-FLOW] pay called: productId=" + productId + " billingConnected=" + billingConnected);
String developerPayload = "";
try {
byte[] decoded = Base64.getDecoder().decode(appInfo);
JSONObject json = new JSONObject(new String(decoded, "UTF-8"));
JSONObject payload = new JSONObject();
String customData = json.optString("customData", "");
payload.put("orderId", prodorderId);
payload.put("userId", json.optString("userId", ""));
payload.put("pfid", json.optString("pfid", ""));
if (!customData.isEmpty()) {
payload.put("customDataB64", Base64.getEncoder().encodeToString(customData.getBytes("UTF-8")));
}
payload.put("prodPrice", productPrice);
payload.put("prodCount", productCount);
developerPayload = payload.toString();
Log.i(TAG, "[PAY-CUSTOMDATA] customData length=" + customData.length()
+ " developerPayload length=" + developerPayload.length());
} catch (Exception e) {
Log.w(TAG, "Failed to extract payload fields from appInfo: " + e.getMessage());
}
String finalPayload = developerPayload;
ensureBillingReady(activity, "pay", bs ->
billingExecutor.execute(() -> {
try {
if (bs == null || !bs.isReady()) {
Log.e(TAG, "[PAY-FLOW] billingService became null or not ready");
sendPayCallback(1, "billing_not_ready", null, null, null, null);
return;
}
Log.i(TAG, "[PAY-FLOW] launching billing flow for: " + productId + " payload=" + finalPayload);
BillingResult result = bs.launchBillingFlow(activity,
new BillingFlowParams(productId, "inapp", finalPayload));
Log.i(TAG, "[PAY-FLOW] launchBillingFlow result: code=" + result.getResponseCode()
+ " debugMsg=" + result.getDebugMessage());
if (result.getResponseCode() != 2000) {
Log.e(TAG, "[PAY-FLOW] launchBillingFlow error: code=" + result.getResponseCode()
+ " debugMsg=" + result.getDebugMessage());
sendPayCallback(1, "billing_flow_error_" + result.getResponseCode()
+ "_" + result.getDebugMessage(), null, null, null, null);
}
} catch (Exception e) {
Log.e(TAG, "[PAY-FLOW] launchBillingFlow exception: " + e.getClass().getName()
+ " msg=" + e.getMessage());
sendPayCallback(1, "launch_billing_failed: " + e.getMessage(), null, null, null, null);
}
}),
() -> sendPayCallback(1, "billing_not_ready", null, null, null, null));
}
@Override
public void queryProducts() {
// Flexion 渠道不通过 thirdExtend 获取商品列表,由 queryProducts(String) 替代
}
@Override
public void queryProducts(String productIds) {
Log.i(TAG, "queryProducts(productIds) called, billingConnected=" + billingConnected);
List<String> ids = Arrays.asList(productIds.split(","));
Log.i(TAG, "queryProductDetails with " + ids.size() + " items from config");
ensureBillingReady(null, "queryProducts",
bs -> queryProductDetails(bs, ids),
() -> sendExtensionError("billing_not_ready"));
}
private static void initBillingService(Activity activity) {
Log.i(TAG, "[PAY-FLOW] initBillingService");
ensureBillingReady(activity, "initBillingService",
bs -> queryPendingPurchases(),
() -> Log.w(TAG, "[PAY-FLOW] initBillingService failed: billing not ready"));
}
private static void ensureBillingReady(Activity activity, String operation,
BillingReadyOperation onReady, Runnable onFail) {
ensureBillingReady(activity, operation, onReady, onFail, false);
}
private static void ensureBillingReady(Activity activity, String operation,
BillingReadyOperation onReady, Runnable onFail,
boolean forceReconnect) {
if (activity != null) {
billingActivity = activity;
}
Activity targetActivity = activity != null ? activity : billingActivity;
if (targetActivity == null) {
Log.e(TAG, "[PAY-FLOW] ensureBillingReady failed: activity is null operation=" + operation);
if (onFail != null) onFail.run();
return;
}
targetActivity.runOnUiThread(() -> {
try {
if (billingService == null) {
Log.i(TAG, "[PAY-FLOW] create BillingService operation=" + operation);
billingService = FLX.createBillingService(targetActivity, purchasesListener);
}
boolean ready = billingService != null && billingService.isReady();
Log.i(TAG, "[PAY-FLOW] ensureBillingReady operation=" + operation
+ " connected=" + billingConnected
+ " ready=" + ready
+ " connecting=" + billingConnecting
+ " forceReconnect=" + forceReconnect);
if (ready && !forceReconnect) {
billingConnected = true;
if (onReady != null) onReady.run(billingService);
return;
}
pendingBillingOperations.add(new PendingBillingOperation(operation, onReady, onFail));
if (billingConnecting) {
Log.i(TAG, "[PAY-FLOW] billing connection already in progress, queued operation=" + operation);
return;
}
billingConnecting = true;
Log.i(TAG, "[PAY-FLOW] billing reconnect start operation=" + operation);
billingService.startConnection(targetActivity, new ConnectionStateListener() {
@Override
public void onBillingSetupFinished(BillingResult result) {
int code = result.getResponseCode();
Log.i(TAG, "[PAY-FLOW] onBillingSetupFinished: code=" + code);
billingConnecting = false;
billingConnected = code == BillingResults.ResultCode.CONNECTION_SUCCESS_CODE;
drainBillingOperations(billingConnected);
if (billingConnected) {
queryPendingPurchases();
}
}
@Override
public void onBillingServiceDisconnected() {
Log.w(TAG, "[PAY-FLOW] billing service disconnected");
billingConnected = false;
}
});
mainHandler.postDelayed(() -> {
if (!billingConnecting) return;
boolean timeoutReady = billingService != null && billingService.isReady();
Log.w(TAG, "[PAY-FLOW] billing reconnect timeout operation=" + operation
+ " ready=" + timeoutReady);
billingConnecting = false;
billingConnected = timeoutReady;
drainBillingOperations(timeoutReady);
}, 10000);
} catch (Exception e) {
Log.e(TAG, "[PAY-FLOW] ensureBillingReady exception operation=" + operation
+ " msg=" + e.getMessage());
billingConnecting = false;
billingConnected = false;
drainBillingOperations(false);
}
});
}
private static void drainBillingOperations(boolean success) {
List<PendingBillingOperation> operations = new ArrayList<>(pendingBillingOperations);
pendingBillingOperations.clear();
Log.i(TAG, "[PAY-FLOW] drainBillingOperations success=" + success
+ " count=" + operations.size());
for (PendingBillingOperation operation : operations) {
if (success) {
if (operation.onReady != null) operation.onReady.run(billingService);
} else {
Log.w(TAG, "[PAY-FLOW] billing operation failed operation=" + operation.operation);
if (operation.onFail != null) operation.onFail.run();
}
}
}
private static void handlePurchase(Purchase purchase) {
Log.i(TAG, "[PAY-FLOW] handlePurchase: state=" + purchase.getPurchaseState()
+ " orderId=" + purchase.getOrderId()
+ " token=" + purchase.getToken());
if (purchase.getPurchaseState() == 0) {
Log.i(TAG, "[PAY-FLOW] purchase success, sending to Unity for verification");
sendPayCallback(0, "success", purchase.getOrderId(),
purchase.getPurchaseJson(), purchase.getSignature(), purchase.getToken());
} else if (purchase.getPurchaseState() == 2) {
Log.i(TAG, "[PAY-FLOW] purchase state=2 (pending), skip");
}
}
private static void queryPendingPurchases() {
Log.i(TAG, "[PAY-FLOW] queryPendingPurchases start: billingService=" + billingService
+ " billingConnected=" + billingConnected);
ensureBillingReady(null, "queryPendingPurchases",
bs -> bs.queryPurchasesAsync(
new QueryPurchasesParams("inapp"),
(result, purchases) -> {
Log.i(TAG, "[PAY-FLOW] queryPendingPurchases result: code=" + result.getResponseCode()
+ " count=" + (purchases == null ? 0 : purchases.size()));
if (purchases != null) for (Purchase p : purchases) cachePendingPurchase(p);
}),
() -> Log.w(TAG, "[PAY-FLOW] queryPendingPurchases skipped: billing not connected"));
}
private static void cachePendingPurchase(Purchase purchase) {
if (purchase == null) {
Log.w(TAG, "[PAY-FLOW] cachePendingPurchase skipped: purchase is null");
return;
}
Log.i(TAG, "[PAY-FLOW] cachePendingPurchase state=" + purchase.getPurchaseState()
+ " orderId=" + purchase.getOrderId() + " token=" + purchase.getToken());
if (purchase.getPurchaseState() != 0) return;
try {
JSONObject result = new JSONObject();
if (purchase.getOrderId() != null) result.put("orderId", purchase.getOrderId());
if (purchase.getPurchaseJson() != null) result.put("purchaseJson", purchase.getPurchaseJson());
if (purchase.getSignature() != null) result.put("signature", purchase.getSignature());
if (purchase.getToken() != null) result.put("purchaseToken", purchase.getToken());
synchronized (pendingPurchases) {
String token = purchase.getToken();
for (String item : pendingPurchases) {
JSONObject cached = new JSONObject(item);
if (token != null && token.equals(cached.optString("purchaseToken", null))) {
Log.i(TAG, "[PAY-FLOW] pending purchase already cached token=" + token);
return;
}
}
pendingPurchases.add(result.toString());
}
Log.i(TAG, "[PAY-FLOW] cached pending purchase: orderId=" + purchase.getOrderId()
+ " cachedCount=" + pendingPurchases.size());
} catch (JSONException e) {
Log.e(TAG, "[PAY-FLOW] cachePendingPurchase json error: " + e.getMessage());
}
}
@Override
public String getPendingPurchases() {
synchronized (pendingPurchases) {
Log.i(TAG, "[PAY-FLOW] getPendingPurchases start cachedCount=" + pendingPurchases.size());
JSONArray result = new JSONArray();
for (String item : pendingPurchases) {
try {
result.put(new JSONObject(item));
} catch (JSONException e) {
Log.e(TAG, "[PAY-FLOW] getPendingPurchases json error: " + e.getMessage());
}
}
pendingPurchases.clear();
Log.i(TAG, "[PAY-FLOW] getPendingPurchases count=" + result.length());
return result.toString();
}
}
@Override
public void refreshBilling() {
Log.i(TAG, "[PAY-FLOW] refreshBilling requested");
billingConnected = false;
ensureBillingReady(null, "refreshBilling",
bs -> Log.i(TAG, "[PAY-FLOW] refreshBilling ready"),
() -> Log.w(TAG, "[PAY-FLOW] refreshBilling failed"),
true);
}
private static void queryProductDetails(BillingService service, List<String> productIds) {
final boolean[] completed = {false};
mainHandler.postDelayed(() -> {
if (completed[0]) return;
completed[0] = true;
Log.w(TAG, "[PAY-FLOW] queryProductDetails timeout count=" + productIds.size());
sendExtensionError("flexion_query_timeout");
}, 30000);
service.queryProductDetailsAsync(
new ProductDetailsParams("inapp", productIds),
(billingResult, productDetails) -> {
if (completed[0]) {
Log.w(TAG, "[PAY-FLOW] queryProductDetails callback ignored after timeout");
return;
}
completed[0] = true;
try {
JSONObject result = new JSONObject();
if (billingResult.getResponseCode() == BillingResults.ResultCode.QUERY_PRODUCT_DETAILS_SUCCESS_CODE
&& productDetails != null) {
JSONArray arr = new JSONArray();
for (ProductDetails detail : productDetails) {
JSONObject item = new JSONObject();
item.put("productId", detail.getId());
item.put("ourProductId", detail.getId());
item.put("title", detail.getTitle());
item.put("description", detail.getDescription());
item.put("price", detail.getPrice());
item.put("price_amount_micros", detail.getPriceAmountMicros());
item.put("price_currency_code", detail.getPriceCurrencyCode());
item.put("type", detail.getType());
arr.put(item);
}
result.put("code", 0);
result.put("respObj", arr.toString());
} else {
result.put("code", 1);
result.put("thirdExtend_errStr",
"flexion_query_failed: " + billingResult.getDebugMessage());
}
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, result.toString());
} catch (JSONException e) {
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, "{\"code\":1}");
}
});
}
private static void sendPayCallback(int code, String errStr, String storeOrderId,
String purchaseJson, String signature, String purchaseToken) {
Log.i(TAG, "[PAY-FLOW] sendPayCallback: code=" + code + " errStr=" + errStr
+ " storeOrderId=" + storeOrderId
+ " hasPurchaseJson=" + (purchaseJson != null) + " hasSignature=" + (signature != null)
+ " hasToken=" + (purchaseToken != null));
try {
JSONObject result = new JSONObject();
result.put("code", code);
result.put("errStr", errStr != null ? errStr : "");
if (storeOrderId != null) result.put("orderId", storeOrderId);
if (purchaseJson != null) result.put("purchaseJson", purchaseJson);
if (signature != null) result.put("signature", signature);
if (purchaseToken != null) result.put("purchaseToken", purchaseToken);
Log.i(TAG, "[PAY-FLOW] UnitySendMessage callback: " + result.toString());
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
ConfigManager.PAY_CALLBACK_FUNCTION_NAME, result.toString());
} catch (JSONException e) {
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
ConfigManager.PAY_CALLBACK_FUNCTION_NAME, "{\"code\":1,\"errStr\":\"json_error\"}");
}
}
@Override
public void consume(String token) {
consumePurchase(token);
}
public static void consumePurchase(String token) {
if (token == null || token.isEmpty()) {
Log.w(TAG, "[PAY-FLOW] consumePurchase: token is null");
return;
}
Log.i(TAG, "[PAY-FLOW] consumePurchase: token=" + token);
ensureBillingReady(null, "consumePurchase",
bs -> bs.consumeAsync(
new ConsumeParams(token),
r -> Log.i(TAG, "[PAY-FLOW] consume result: " +
(r.getResponseCode() == BillingResults.ResultCode.CONSUME_SUCCESS_CODE ? "ok" : "fail"))),
() -> Log.w(TAG, "[PAY-FLOW] consumePurchase skipped: billing not connected"));
}
public static void cancelPurchase() {
Log.i(TAG, "[PAY-FLOW] cancelPurchase: TODO - dismiss billing dialog");
}
private static void sendExtensionError(String errStr) {
try {
JSONObject result = new JSONObject();
result.put("code", 1);
result.put("thirdExtend_errStr", errStr);
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, result.toString());
} catch (JSONException e) {
UnityPlayer.UnitySendMessage(ConfigManager.UNITY_FACADE_NAME,
ConfigManager.PAY_TYPE_CALLBACK_FUNCTION_NAME, "{\"code\":1}");
}
}
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,66 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation(platform("com.google.firebase:firebase-bom:33.6.0"))
implementation("com.google.firebase:firebase-analytics")
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,131 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
// Google Play Billing — tuyoosdk AAR references BillingManager during init
implementation 'com.android.billingclient:billing:7.0.0'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
// Flexion SDK (includes wrapped billing)
implementation("com.flexionmobile:sdk:4.0.1")
implementation 'com.google.android.gms:play-services-basement:18.2.0'
implementation 'androidx.fragment:fragment:1.3.6'
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
implementation('com.facebook.android:facebook-android-sdk:16.2.0')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
// Android Resolver Dependencies Start
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
implementation 'com.appsflyer:purchase-connector:2.2.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:8
implementation 'com.appsflyer:unity-wrapper:6.17.7' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:6
implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5
implementation 'com.tapjoy:tapjoy-android-unitybridge:14.5.0' // Packages/com.unity.package-offerwall/Editor/TJPluginDependencies.xml:10
// Android Resolver Dependencies End
**DEPS**}
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,49 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
// Flexion SDK Maven Repository
maven {
url = uri("https://maven.pkg.github.com/FlexionSDK/JavaSDK")
credentials {
username = "FlexionSDK"
// Replace with your actual Flexion PAT from DropPoint
password = "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"
}
}
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://sdk.tapjoy.com/" // Packages/com.unity.package-offerwall/Editor/TJPluginDependencies.xml:9
}
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arkgame.ft"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application android:extractNativeLibs="true" android:name="com.unity3d.player.TYApp" android:usesCleartextTraffic="true">
<activity android:name="com.unity3d.player.TYUnityActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="fishingtraveliae.onelink.me" android:pathPrefix="/jT1Q"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="mainactivity" android:scheme="zzft" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="true" />
</activity>
<meta-data android:name="CHANNEL" android:value="GooglePlay" />
</application>
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> <!-- allows app to access Facebook app features -->
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" /> <!-- allows sharing to Messenger app -->
<intent>
<action android:name="android.intent.action.MAIN"/>
</intent>
</queries>
</manifest>

View File

@@ -1,13 +0,0 @@
package com.unity3d.player;
public class ChannelEntry {
public static final String CHANNEL = "GooglePlay";
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
return null;
}
public static String normalizeSkuList(String msg) {
return msg;
}
}

View File

@@ -1,29 +0,0 @@
package com.unity3d.player;
public class ConfigManager {
// Common SDK parameters
public static int SDK_APPID = 20587;
public static String SDK_GAMEID = "20587";
public static String SDK_PROJECTID = "20587";
public static String SDK_CLOUDID = "128";
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.googleplay.FishingMaster";
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
// FCM (anti-addiction system)
public static String FCM_NAMESPACE = "128";
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
// Unity Facade callback names
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
}

View File

@@ -1,47 +0,0 @@
{
"project_info": {
"project_number": "481260393117",
"project_id": "fishing-travel",
"storage_bucket": "fishing-travel.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:481260393117:android:4e8da50d0ee3b5c207fa74",
"android_client_info": {
"package_name": "com.arkgame.ft"
}
},
"oauth_client": [
{
"client_id": "481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.arkgame.ft",
"certificate_hash": "c9cf2f5eaba383cbdd5b968d0342c49afabc32a2"
}
},
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,66 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation(platform("com.google.firebase:firebase-bom:33.6.0"))
implementation("com.google.firebase:firebase-analytics")
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,110 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
implementation('com.android.billingclient:billing:7.0.0')
implementation 'com.google.android.gms:play-services-basement:18.2.0'
implementation 'androidx.fragment:fragment:1.3.6'
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
implementation('com.facebook.android:facebook-android-sdk:16.2.0')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
// Android Resolver Dependencies Start
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
implementation 'com.appsflyer:purchase-connector:2.2.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:8
implementation 'com.appsflyer:unity-wrapper:6.17.7' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:6
implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5
// Android Resolver Dependencies End
**DEPS**}
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,35 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arkgame.ft"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application android:extractNativeLibs="true" android:name="com.unity3d.player.TYApp"
tools:replace="android:usesCleartextTraffic"
tools:overrideLibrary="com.tuyoo.gamesdk"
android:usesCleartextTraffic="true">
<activity android:name="com.unity3d.player.TYUnityActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="fishingtraveliae.onelink.me" android:pathPrefix="/jT1Q"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="mainactivity" android:scheme="zzft" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="CHANNEL" android:value="Rustore" />
</application>
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> <!-- allows app to access Facebook app features -->
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" /> <!-- allows sharing to Messenger app -->
</queries>
</manifest>

View File

@@ -1,44 +0,0 @@
package com.unity3d.player;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class ChannelEntry {
public static final String CHANNEL = "Rustore";
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
return null;
}
public static String normalizeSkuList(String msg) {
if (msg == null || msg.isEmpty()) return msg;
try {
JSONArray products = new JSONArray(msg);
for (int i = 0; i < products.length(); i++) {
JSONObject p = products.getJSONObject(i);
// price is in kopecks, convert to micros: kopecks * 10000
String price = p.optString("price", "0");
long micros = Long.parseLong(price) * 10000;
p.put("price_amount_micros", String.valueOf(micros));
// Map currency → price_currency_code
String currency = p.optString("currency", "");
if (!currency.isEmpty()) {
p.put("price_currency_code", currency);
}
// Convert display price: "199" → "₽1.99"
float rubles = Float.parseFloat(price) / 100;
p.put("price", String.format("₽%s", rubles));
}
return products.toString();
} catch (JSONException e) {
Log.e("ChannelEntry", "normalizeSkuList error: " + e.getMessage());
return msg;
}
}
}

View File

@@ -1,29 +0,0 @@
package com.unity3d.player;
public class ConfigManager {
// Common SDK parameters
public static int SDK_APPID = 20587;
public static String SDK_GAMEID = "20587";
public static String SDK_PROJECTID = "20587";
public static String SDK_CLOUDID = "128";
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.rustore.FishingTravel";
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
// FCM (anti-addiction system)
public static String FCM_NAMESPACE = "128";
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
// Unity Facade callback names
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
}

View File

@@ -1,14 +0,0 @@
plugins {
// If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
// See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
// See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
// To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'com.google.gms.google-services' version '4.3.3' apply false
**BUILD_SCRIPT_DEPS**
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,74 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation(platform("com.google.firebase:firebase-bom:33.6.0"))
implementation("com.google.firebase:firebase-analytics")
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
// ↓↓↓ 这里放你的 VK ID 占位符 ↓↓↓
manifestPlaceholders = [
VKIDRedirectHost : "vk.ru",
VKIDRedirectScheme: "vk54432404",
VKIDClientID : "54432404",
VKIDClientSecret : "WD6BO0CwPXsKMaaFX8Qq"
]
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,131 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
implementation('com.android.billingclient:billing:6.0.1')
implementation 'com.google.android.gms:play-services-basement:18.2.0'
implementation 'androidx.fragment:fragment:1.3.6'
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
implementation platform('com.google.firebase:firebase-bom:32.7.4')
implementation 'com.google.firebase:firebase-analytics'
implementation('com.facebook.android:facebook-android-sdk:16.2.0')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
implementation(platform("ru.rustore.sdk:bom:2025.11.01"))
implementation("ru.rustore.sdk:pay")
implementation "ru.rustore.sdk:review:10.0.0"
implementation "com.vk.id:vkid:2.5.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
// Android Resolver Dependencies Start
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
implementation 'com.appsflyer:purchase-connector:2.2.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:8
implementation 'com.appsflyer:unity-wrapper:6.17.7' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:6
implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5
// Android Resolver Dependencies End
**DEPS**}
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,46 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
maven{
url "https://artifactory-external.vkpartner.ru/artifactory/vkid-sdk-android/"
}
maven{
url "https://artifactory-external.vkpartner.ru/artifactory/maven/"
}
maven{
url "https://artifactory-external.vkpartner.ru/artifactory/vk-id-captcha/android/"
}
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -1,43 +0,0 @@
#!/bin/bash
# Usage: ./switch-channel.sh <channel>
# channel: googleplay | flexion | rustore
#
# 切换渠道后重新用 Unity 打 Android 包即可打出对应渠道的 APK。
# 脚本会同步AAR、Gradle 配置、AndroidManifest、Java 文件ConfigManager、ChannelHelpers 等)
CHANNEL=${1:-googleplay}
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
CHANNEL_DIR="$SCRIPT_DIR/$CHANNEL"
PROJ_DIR="$SCRIPT_DIR/../../sdk-intergration"
TYSDK_PLUGINS="$PROJ_DIR/Packages/tysdk/Plugins/Android"
ASSETS_PLUGINS="$PROJ_DIR/Assets/Plugins/Android"
# 校验渠道目录
if [ ! -d "$CHANNEL_DIR" ]; then
echo "ERROR: Unknown channel '$CHANNEL'. Available: googleplay, flexion, rustore"
exit 1
fi
echo "=== Switching to channel: $CHANNEL ==="
# 1. Sync channel AAR to tysdk package (only tuyoosdk, gasdk stays permanently)
echo "[AAR] Syncing tuyoosdk to $TYSDK_PLUGINS"
find "$TYSDK_PLUGINS" -maxdepth 1 -name "tuyoosdk_*.aar" -delete
cp "$CHANNEL_DIR/Plugins/Android/"*.aar "$TYSDK_PLUGINS/" 2>/dev/null
# 2. Sync Gradle + Manifest to Assets/Plugins/Android
echo "[Config] Syncing gradle/manifest to $ASSETS_PLUGINS"
for f in "$CHANNEL_DIR"/*.gradle "$CHANNEL_DIR"/*.properties "$CHANNEL_DIR"/AndroidManifest.xml; do
[ -f "$f" ] && cp "$f" "$ASSETS_PLUGINS/"
done
# 3. Sync Java files to tysdk package
echo "[Java] Syncing ConfigManager + ChannelHelpers to $TYSDK_PLUGINS"
for f in "$CHANNEL_DIR"/*.java; do
[ -f "$f" ] && cp "$f" "$TYSDK_PLUGINS/"
done
echo "=== Done. Channel: $CHANNEL ==="
echo ""
echo "Next: Open Unity and build Android APK."

View File

@@ -1,7 +0,0 @@
{
"permissions": {
"allow": [
"WebSearch"
]
}
}

View File

@@ -1,154 +0,0 @@
# 合并记录: dev_rustore 测试内容 → dev_flexion
**日期:** 2026-04-30
**源分支:** dev_rustore (c105818)
**目标分支:** dev_flexion (66aa7a9)
---
## 已合并的文件
### 1. sdk-intergration/Assets/Scripts/SDKTest.cs
新增 VK 登录/绑定/检查 和 Review 测试按钮及事件处理:
**新增字段:**
- `_loginVkBtn` — VK 登录按钮
- `_linkVkBtn` — VK 绑定按钮
- `_checkVkBtn` — VK 检查绑定按钮
- `_reviewBtn` — 应用评价按钮
**新增监听 (Start):**
```csharp
_loginVkBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwVkid));
_linkVkBtn.onClick.AddListener(OnLinkVkId);
_checkVkBtn.onClick.AddListener(OnCheckVKId);
_reviewBtn.onClick.AddListener(OnReview);
```
**新增方法:**
```csharp
private async void OnLinkVkId() // VK 绑定 → TYSdkFacade.Instance.LinkAccount(EAccoutType.hwVkid)
private async void OnCheckVKId() // VK 检查 → TYSdkFacade.Instance.LinkCheck(EAccoutType.hwVkid)
private void OnReview() // 评价 → UnityBridgeFunc.Review()
```
### 2. sdk-intergration/Assets/Scenes/SampleScene.unity
直接从 dev_rustore 检出完整文件,包含新增 UI 按钮 GameObject:
- VK Login 按钮
- VK Link 按钮
- VK Check 按钮
- Review 按钮
### 3. sdk-intergration/ProjectSettings/ProjectSettings.asset
修复构建错误,将 `AndroidMinSdkVersion` 从 25 提升到 26:
- **原因:** `tuyoosdk_1.0.0.aar` 声明 minSdkVersion 26,低于此版本会 manifest 合并失败
- **影响:** 全局生效,所有渠道统一 minSdk 26
---
## 跳过的文件 (dev_flexion 已有更完善的实现)
### TYSdkModel.cs — 跳过
- dev_rustore: 硬编码 `AccountInfo.hwPayType = "rustore.global.app"`, SKUDetail 写死 Rustore 格式
- dev_flexion: 使用 `ChannelConfig.Channel` 动态区分渠道,同时兼容 Google/Rustore/Flexion
- **理由:** dev_flexion 的 `ChannelConfig` 抽象更成熟,无需降级
### TYSdkFacade.cs — 跳过
- dev_rustore: 硬编码 `Channel = "hwVkid"`, 超时 120s
- dev_flexion: 已有 `Channel => ChannelConfig.Channel`, 动态 `LoginTimeoutSeconds`
- **理由:** dev_flexion 已包含 VK 映射 `{"vk.global.app", EAccoutType.hwVkid}`, 且抽象更优
### TYSdkFacade_Pay.cs — 跳过
- dev_rustore: `var pType = tysdk.AccountInfo.hwPayType` (硬编码 rustore)
- dev_flexion: `var pType = ChannelConfig.PayType` (动态配置)
- **理由:** dev_flexion 的方案已覆盖 rustore 支付类型
### UnityBridgeFunc.cs — 跳过
- dev_rustore: 仅代码格式重排,无功能变更
- dev_flexion: 已包含 `Review()` 等方法声明
---
## 构建错误修复
```
Error: uses-sdk:minSdkVersion 25 cannot be smaller than version 26
declared in library [:tuyoosdk_1.0.0:]
```
**修复:** `ProjectSettings.asset``AndroidMinSdkVersion: 25``26`
**替代方案分析:**
- `tools:overrideLibrary="com.tuyoo.gamesdk"` (rustore AndroidManifest 已有) 只能绕过 manifest 合并冲突
- 无法绕过 gradle 层 `processReleaseMainManifest` task 的 minSdkVersion 检查
- 改 ProjectSettings 是唯一可行方案
---
## SKU 列表格式统一
**问题:** Rustore 和 GooglePlay 返回的商品列表 JSON 字段不同C# 端用同一个 `SKUDetail` 类反序列化。
**方案:** 在 Java 端 `ChannelHelpers.normalizeSkuList()` 中统一格式C# 端不做渠道判断。
### 数据流
```
SDK API → defaultThirdExtend() → ChannelHelpers.normalizeSkuList(msg) → Unity SKUListResult → DeserializeObject<List<SKUDetail>>
```
### 变更文件
#### 1. ExtraPluginCfgs/Android/rustore/ChannelHelpers.java — 新增 normalizeSkuList
```java
// 将 Rustore 原始格式转为统一格式:
// price: "199" (戈比) → "₽1.99"
// 新增 price_amount_micros: "199" * 10000 = "1990000"
// 新增 price_currency_code: ← currency 字段
```
#### 2. ExtraPluginCfgs/Android/googleplay/ChannelHelpers.java — 新增 normalizeSkuList
```java
// GooglePlay 格式已是标准,直接原样返回
public static String normalizeSkuList(String msg) { return msg; }
```
#### 3. ExtraPluginCfgs/Android/flexion/ChannelHelpers.java — 新增 normalizeSkuList
```java
// Flexion 有自己的 SDKHelper.queryProducts(),不走 defaultThirdExtend编译需要方法存在
public static String normalizeSkuList(String msg) { return msg; }
```
#### 4. SDKManager.java — defaultThirdExtend 调用 normalizeSkuList
```java
// 回调成功时: result.put("respObj", ChannelHelpers.normalizeSkuList(msg));
```
#### 5. TYSdkModel.cs — SKUDetail 简化
```csharp
// 去掉 Normalize() 方法和 normalized 字段
// 属性直接用统一字段:
// ProdPrice => float.Parse(price_amount_micros) / 1000000
// ProdPriceStr => price
```
#### 6. TYSdkFacade_Pay.cs — SKUListResult 去掉 Normalize 调用
```csharp
// 反序列化后直接赋值,不再调 sku.Normalize()
```
### 扩展新渠道
添加新渠道时只需:
1. 创建 `ExtraPluginCfgs/Android/{channel}/ChannelHelpers.java`
2. 实现 `normalizeSkuList()` 将该渠道 SKU JSON 转为统一格式
3. C# 端无需改动

View File

@@ -93,4 +93,3 @@ crashlytics-build.properties
/Assets/StreamingAssets/*.bundle
/Assets/StreamingAssets/*.bundle.meta
.claude/*

View File

@@ -55,17 +55,31 @@ public class BuildTool
BuildiOS(bparams);
}
[MenuItem("Tools/Build Android")]
public static void BuildAndroid()
{
ChannelBuildTool.Build_GooglePlay();
}
[MenuItem("Tools/Build Android With Debug")]
public static void BuildAndroidWithDebug()
{
ChannelBuildTool.Build_GooglePlay_Debug();
}
[MenuItem("Tools/Build Android")]
public static void BuildAndroid()
{
BuildParams bparams = new BuildParams()
{
outPath = "../Bin/tysdkTest.apk"
};
BuildAndroid(bparams);
}
[MenuItem("Tools/Build Android With Debug")]
public static void BuildAndroidWithDebug()
{
BuildParams bparams = new BuildParams()
{
outPath = "../Bin/tysdkTest_debug.apk",
};
var buildOptions = BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.WaitForPlayerConnection;
BuildAndroid(bparams, buildOptions);
}
public static void CIBuildAndroid()
{

View File

@@ -1,198 +0,0 @@
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public class ChannelBuildTool
{
public static readonly string[] SupportedChannels = { "GooglePlay", "Rustore", "Flexion" };
private const string DefaultChannel = "GooglePlay";
private const string DefaultAndroidBundleIdentifier = "com.arkgame.ft";
private const string ExtraCfgRoot = "../ExtraPluginCfgs/Android";
private const string TysdkPlugins = "Packages/tysdk/Plugins/Android";
private const string TysdkFiles = "Packages/tysdk/Files";
private const string AssetsPlugins = "Assets/Plugins/Android";
private static readonly string[] GradleFiles =
{
"mainTemplate.gradle",
"launcherTemplate.gradle",
"settingsTemplate.gradle",
"gradleTemplate.properties",
"AndroidManifest.xml"
};
// ==================== Channel Switching ====================
private static void SwitchChannel(string channel)
{
var channelDir = channel.ToLower();
var cfgDir = Path.Combine(ExtraCfgRoot, channelDir);
if (!Directory.Exists(cfgDir))
{
Debug.LogError($"[ChannelSwitch] Channel config not found: {cfgDir}");
return;
}
Debug.Log($"[ChannelSwitch] Switching to {channel}...");
currentChannel = channel;
// 1. Sync AAR
var srcAarDir = Path.Combine(cfgDir, "Plugins/Android");
if (Directory.Exists(srcAarDir))
{
foreach (var oldAar in Directory.GetFiles(TysdkPlugins, "tuyoosdk_*.aar"))
File.Delete(oldAar);
foreach (var oldJar in Directory.GetFiles(TysdkPlugins, "tuyoosdk_*.jar"))
File.Delete(oldJar);
foreach (var aar in Directory.GetFiles(srcAarDir, "*.aar"))
{
var dest = Path.Combine(TysdkPlugins, Path.GetFileName(aar));
File.Copy(aar, dest, true);
Debug.Log($"[ChannelSwitch] AAR: {aar} → {dest}");
}
}
// 2. Clean up previous channel Java files
foreach (var oldJava in Directory.GetFiles(TysdkPlugins, "ChannelHelpers.java"))
File.Delete(oldJava);
foreach (var oldJava in Directory.GetFiles(TysdkPlugins, "ChannelEntry.java"))
File.Delete(oldJava);
foreach (var oldJava in Directory.GetFiles(TysdkPlugins, "*SDKHelper.java"))
File.Delete(oldJava);
foreach (var oldJava in Directory.GetFiles(TysdkPlugins, "*SDKService.java"))
File.Delete(oldJava);
foreach (var oldJava in Directory.GetFiles(TysdkPlugins, "*SDKAdapter.java"))
File.Delete(oldJava);
var oldConfig = Path.Combine(TysdkPlugins, "ConfigManager.java");
if (File.Exists(oldConfig)) File.Delete(oldConfig);
// 3. Sync Gradle + Manifest
foreach (var fileName in GradleFiles)
{
var src = Path.Combine(cfgDir, fileName);
if (File.Exists(src))
{
var dest = Path.Combine(AssetsPlugins, fileName);
File.Copy(src, dest, true);
Debug.Log($"[ChannelSwitch] Config: {src} → {dest}");
}
}
// 4. Sync channel Java files to tysdk package
foreach (var javaFile in Directory.GetFiles(cfgDir, "*.java"))
{
var fileName = Path.GetFileName(javaFile);
var dest = Path.Combine(TysdkPlugins, fileName);
File.Copy(javaFile, dest, true);
Debug.Log($"[ChannelSwitch] Java: {javaFile} → {dest}");
}
// 5. Sync google-services.json (fallback to GooglePlay default)
var srcGoogleServices = Path.Combine(cfgDir, "Files/google-services.json");
if (!File.Exists(srcGoogleServices))
srcGoogleServices = Path.Combine(ExtraCfgRoot, "googleplay/Files/google-services.json");
var destGoogleServices = Path.Combine(TysdkFiles, "google-services.json");
File.Copy(srcGoogleServices, destGoogleServices, true);
Debug.Log($"[ChannelSwitch] google-services.json: {srcGoogleServices} → {destGoogleServices}");
// 6. Set Bundle Identifier per channel
var bundleId = channel switch
{
"Flexion" => "com.arkgame.ft.flexion",
_ => "com.arkgame.ft"
};
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, bundleId);
Debug.Log($"[CHANNEL-VERIFY] Bundle Identifier → {bundleId}");
// 7. Set runtime channel
tysdk.ChannelConfig.SetChannel(channel);
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
Debug.Log($"[ChannelSwitch] Done. Channel: {channel}");
}
// ==================== Build ====================
private static void RestoreDefaultChannel()
{
Debug.Log($"[ChannelBuild] Restore default channel -> {DefaultChannel}");
SwitchChannel(DefaultChannel);
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, DefaultAndroidBundleIdentifier);
Debug.Log($"[ChannelBuild] Restore bundle identifier -> {DefaultAndroidBundleIdentifier}");
AssetDatabase.SaveAssets();
}
private static void BuildAndroidForChannel(string channel, bool debug)
{
try
{
SwitchChannel(channel);
string fileName = debug ? $"tysdkTest_{channel}_debug.apk" : $"tysdkTest_{channel}.apk";
string outPath = $"../Bin/{fileName}";
var buildOptions = debug
? BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.WaitForPlayerConnection
: BuildOptions.None;
var buildPlayerOptions = new BuildPlayerOptions
{
scenes = EditorBuildSettings.scenes.Select(x => x.path).ToArray(),
locationPathName = outPath,
target = BuildTarget.Android,
options = buildOptions,
};
Debug.Log($"[ChannelBuild] Building {channel} → {outPath}");
var buildReport = BuildPipeline.BuildPlayer(buildPlayerOptions);
if (buildReport?.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded)
{
Debug.Log($"[ChannelBuild] Success: {Path.GetFullPath(outPath)}");
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
}
else
{
Debug.LogError($"[ChannelBuild] Failed: {buildReport?.summary}");
}
}
finally
{
RestoreDefaultChannel();
}
}
private static string currentChannel = "";
// ==================== Menu: Switch Channel ====================
[MenuItem("Tools/Switch Channel/GooglePlay")]
public static void Switch_GooglePlay() => SwitchChannel("GooglePlay");
[MenuItem("Tools/Switch Channel/Rustore")]
public static void Switch_Rustore() => SwitchChannel("Rustore");
[MenuItem("Tools/Switch Channel/Flexion")]
public static void Switch_Flexion() => SwitchChannel("Flexion");
// ==================== Menu: Build ====================
[MenuItem("Tools/Build Android (Channel)/GooglePlay")]
public static void Build_GooglePlay() => BuildAndroidForChannel("GooglePlay", false);
[MenuItem("Tools/Build Android (Channel)/GooglePlay Debug")]
public static void Build_GooglePlay_Debug() => BuildAndroidForChannel("GooglePlay", true);
[MenuItem("Tools/Build Android (Channel)/Rustore")]
public static void Build_Rustore() => BuildAndroidForChannel("Rustore", false);
[MenuItem("Tools/Build Android (Channel)/Rustore Debug")]
public static void Build_Rustore_Debug() => BuildAndroidForChannel("Rustore", true);
[MenuItem("Tools/Build Android (Channel)/Flexion")]
public static void Build_Flexion() => BuildAndroidForChannel("Flexion", false);
[MenuItem("Tools/Build Android (Channel)/Flexion Debug")]
public static void Build_Flexion_Debug() => BuildAndroidForChannel("Flexion", true);
}

View File

@@ -29,20 +29,10 @@
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="true" />
</activity>
<meta-data android:name="CHANNEL" android:value="GooglePlay" />
</application>
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> <!-- allows app to access Facebook app features -->
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" /> <!-- allows sharing to Messenger app -->
<intent>
<action android:name="android.intent.action.MAIN"/>
</intent>
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" /> <!-- allows sharing to Messenger app -->
</queries>
</manifest>

View File

@@ -7,94 +7,23 @@ import com.tuyoo.gamesdk.api.SDKAPI;
import com.tuyoo.gamesdk.api.SDKAPIConstant;
import com.tuyoo.gamesdk.api.SDKCallBack;
import com.tuyoo.gamesdk.api.SDKWrapper;
import com.tuyoo.gamesdk.login.model.SnsInfo;
import org.json.JSONException;
import org.json.JSONObject;
public class SnsTest {
static final String TAG = "SNSTEST";
static final String GOName = "SDKTest";
static SnsInfo tmpSnsInfo = null;
public static void Bind(String type, String userId)
public static void Bind(String type, String guserId)
{
SDKAPI.getIns().getSnsInfo(type, (snscode, snsInfo, snsmsg) ->{
if(snscode == SDKCallBack.CODE_SUCCESS && snsInfo != null)
if(snscode == SDKCallBack.CODE_SUCCESS && snsInfo !=null)
{
SDKAPI.getIns().bindBySnsId(snsInfo, userId, (bindcode, bindmsg)->{
SDKAPI.getIns().bindBySnsId(snsInfo, guserId, (bindcode, bindmsg)->{
if(bindcode == SDKCallBack.CODE_SUCCESS)
{
try {
JSONObject result = new JSONObject();
result.put("code", bindcode);
result.put("userId", userId);
JSONObject serverResponse = new JSONObject(bindmsg);
JSONObject userInfo = serverResponse.getJSONObject("result");
result.put("loginData", userInfo);
UnityPlayer.UnitySendMessage(GOName, "BindCallback", result.toString());
} catch (JSONException e) {
String msg = "{\"code\":1, \"userId\": 0}";
UnityPlayer.UnitySendMessage(GOName, "BindCallback", msg);
}
}
else if(bindcode == SDKCallBack.CODE_FAILED)
{
try
{
JSONObject bindMsgObj = new JSONObject(bindmsg);
JSONObject bindMsgResult = bindMsgObj.getJSONObject("result");
int bindMsgResultCode = bindMsgResult.getInt("code");
if(bindMsgResultCode == 4)
{
SDKAPI.getIns().checkSnsInfo(snsInfo, (checkcode, checkMsg ) -> {
if(checkcode != SDKCallBack.CODE_SUCCESS)
{
Log.w(TAG, checkMsg);
String msg = "{\"code\":1, \"userId\": 0}";
UnityPlayer.UnitySendMessage(GOName, "BindCallback", msg);
return;
}
try {
tmpSnsInfo = snsInfo;
JSONObject checkMsgObj = new JSONObject(checkMsg);
JSONObject checkResult = checkMsgObj.getJSONObject("result");
String bindInfo = checkResult.getString("bindInfo");
int bindUserId = checkResult.getInt("userId");
JSONObject callbackMsg = new JSONObject();
callbackMsg.put("code", -1);
callbackMsg.put("userId", bindUserId);
callbackMsg.put("bindInfo", bindInfo);
UnityPlayer.UnitySendMessage(GOName, "BindCallback", callbackMsg.toString());
} catch (JSONException e) {
Log.i(TAG, e.toString());
String msg = "{\"code\":1, \"userId\": 0}";
UnityPlayer.UnitySendMessage(GOName, "BindCallback", msg);
}
});
}
else
{
Log.w(TAG, bindmsg);
String msg = "{\"code\":1, \"userId\": 0}";
UnityPlayer.UnitySendMessage(GOName, "BindCallback", msg);
}
}
catch (JSONException e)
{
Log.i(TAG, e.toString());
String msg = "{\"code\":1, \"userId\": 0}";
UnityPlayer.UnitySendMessage(GOName, "BindCallback", msg);
}
Log.i(TAG, "LinkSns success");
}
else
{
Log.w(TAG, bindmsg);
String msg = "{\"code\":1, \"userId\": 0}";
UnityPlayer.UnitySendMessage(GOName, "BindCallback", msg);
Log.i(TAG, String.format("LinkSns failed, code: %d, msg: %s", bindcode, bindmsg));
}
});
}
@@ -105,32 +34,8 @@ public class SnsTest {
});
}
public static void ChangeBind(int unbindUserId, int bindUserId)
public static void Unbind(String type, int userId)
{
if(tmpSnsInfo == null)
{
Log.i(TAG, "tmpSnsInfo is null");
return ;
}
SDKAPI.getIns().unbindBySnsId(tmpSnsInfo, String.valueOf(unbindUserId), (unbindCode, unbindMsg) -> {
Log.i(TAG, "unbindBySnsId code: " + unbindCode + " msg: " + unbindMsg);
if(unbindCode == SDKCallBack.CODE_SUCCESS)
{
SDKAPI.getIns().bindBySnsId(tmpSnsInfo, String.valueOf(bindUserId), (bindCode, bindMsg) -> {
Log.i(TAG, "bindBySnsId code: " + bindCode + " msg: " + bindMsg);
});
}
});
}
public static void RmSns()
{
tmpSnsInfo = null;
}
public static void GetSns(String accountType)
{
Log.i(TAG, "GetSns accountType: " + accountType);
}
}

View File

@@ -1,11 +1,10 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -17,7 +17,6 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {

View File

@@ -13,7 +13,7 @@ android {
}
// Android Resolver Exclusions End
android {
namespace "com.unity3d.player"
namespace "com.unity3d.player"
}
dependencies {
@@ -36,7 +36,7 @@ dependencies {
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
implementation('com.android.billingclient:billing:7.0.0')
implementation('com.android.billingclient:billing:6.0.1')
implementation 'com.google.android.gms:play-services-basement:18.2.0'
implementation 'androidx.fragment:fragment:1.3.6'
@@ -48,7 +48,7 @@ dependencies {
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation platform('com.google.firebase:firebase-bom:32.7.4')
implementation 'com.google.firebase:firebase-analytics'
implementation('com.facebook.android:facebook-android-sdk:16.2.0')
@@ -75,11 +75,23 @@ dependencies {
// Android Resolver Dependencies End
**DEPS**}
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11

File diff suppressed because it is too large Load Diff

View File

@@ -513,127 +513,6 @@ MonoBehaviour:
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
--- !u!1 &385330068
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 385330072}
- component: {fileID: 385330071}
- component: {fileID: 385330070}
- component: {fileID: 385330069}
m_Layer: 5
m_Name: changebind
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &385330069
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 385330068}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 385330070}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &385330070
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 385330068}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &385330071
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 385330068}
m_CullTransparentMesh: 1
--- !u!224 &385330072
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 385330068}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 465819806}
m_Father: {fileID: 1044920373}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &393321311
GameObject:
m_ObjectHideFlags: 0
@@ -670,85 +549,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: -20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &465819805
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 465819806}
- component: {fileID: 465819808}
- component: {fileID: 465819807}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &465819806
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 465819805}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 385330072}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &465819807
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 465819805}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 33
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: CBind
--- !u!222 &465819808
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 465819805}
m_CullTransparentMesh: 1
--- !u!1 &471181945
GameObject:
m_ObjectHideFlags: 0
@@ -870,7 +670,7 @@ GameObject:
- component: {fileID: 514656874}
- component: {fileID: 514656873}
m_Layer: 5
m_Name: rm sns
m_Name: Check sns
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1515,127 +1315,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 757589085}
m_CullTransparentMesh: 1
--- !u!1 &839565401
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 839565402}
- component: {fileID: 839565405}
- component: {fileID: 839565404}
- component: {fileID: 839565403}
m_Layer: 5
m_Name: LoginBySns
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &839565402
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 839565401}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1387388941}
m_Father: {fileID: 1044920373}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &839565403
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 839565401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 839565404}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &839565404
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 839565401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &839565405
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 839565401}
m_CullTransparentMesh: 1
--- !u!1 &845062987
GameObject:
m_ObjectHideFlags: 0
@@ -1827,7 +1506,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: RM SNS
m_Text: CSNS
--- !u!222 &875109649
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -2027,13 +1706,11 @@ RectTransform:
- {fileID: 1956900235}
- {fileID: 1299164145}
- {fileID: 1472314934}
- {fileID: 839565402}
- {fileID: 1274822429}
- {fileID: 1095319726}
- {fileID: 514656872}
- {fileID: 599093755}
- {fileID: 730871748}
- {fileID: 385330072}
m_Father: {fileID: 1451597222}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -2599,87 +2276,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1299164144}
m_CullTransparentMesh: 1
--- !u!1 &1387388940
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1387388941}
- component: {fileID: 1387388943}
- component: {fileID: 1387388942}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1387388941
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1387388940}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 839565402}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1387388942
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1387388940}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 33
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'loginSNS
'
--- !u!222 &1387388943
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1387388940}
m_CullTransparentMesh: 1
--- !u!1 &1422461756
GameObject:
m_ObjectHideFlags: 0
@@ -3275,10 +2871,9 @@ MonoBehaviour:
loginBtn: {fileID: 1472314935}
logoutBtn: {fileID: 1274822430}
getSnsBtn: {fileID: 1095319727}
rmSnsBtn: {fileID: 514656873}
loginBySns: {fileID: 839565403}
checkSnsBtn: {fileID: 514656873}
bindBtn: {fileID: 599093756}
changeBindBtn: {fileID: 385330069}
unbindBtn: {fileID: 730871749}
--- !u!1 &1905578657
GameObject:
m_ObjectHideFlags: 0

View File

@@ -16,8 +16,6 @@ public class SDKTest : MonoBehaviour
private Button _loginGuestBtn;
[SerializeField]
private Button _loginGoogleBtn;
[SerializeField] // VK登录
private Button _loginVkBtn;
[SerializeField]
private Button _loginFbBtn;
[SerializeField]
@@ -25,10 +23,6 @@ public class SDKTest : MonoBehaviour
[SerializeField]
private Button _loginTokenBtn;
[SerializeField]
private Button _linkVkBtn;
[SerializeField]
private Button _checkVkBtn;
[SerializeField]
private Button _linkGoogleBtn;
[SerializeField]
private Button _checkGoogleBtn;
@@ -56,15 +50,8 @@ public class SDKTest : MonoBehaviour
private Button _fbShareLinkBtn;
[SerializeField]
private Button _mfbShareLinkBtn;
[SerializeField]
private Button _reviewBtn;
[SerializeField]
private Text _messageTxt;
[SerializeField]
private Text _titleText;
void Start()
{
@@ -74,7 +61,6 @@ public class SDKTest : MonoBehaviour
GContext.container.RegisterInstance<IConfig>(config);
Debug.Log("SDKTest Start");
UpdateChannelTitle();
//===============================================================================
//====================== Test Server ===========================
// UnityBridgeFunc.UnityResetServerUrl("https://128-hwsfsdk-sdk-test01.qijihdhk.com");
@@ -82,15 +68,10 @@ public class SDKTest : MonoBehaviour
//====================== Test Server ===========================
//===============================================================================
//
_InitBtn.onClick.AddListener(Init);
TYSdkFacade.OnInitComplete += (success, msg) =>
{
_messageTxt.text = success ? $"Init OK: {msg}" : $"Init Failed: {msg}";
};
_InitBtn.onClick.AddListener(Init);
_loginGuestBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwGuest));
_loginGoogleBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwGoogle));
_loginFbBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwFacebook));
_loginVkBtn.onClick.AddListener(() => OnLogin(EAccoutType.hwVkid));
#if UNITY_IOS
_loginAppleBtn.onClick.AddListener(() => OnLogin(EAccoutType.Apple));
#endif
@@ -98,8 +79,6 @@ public class SDKTest : MonoBehaviour
_logOutBtn.onClick.AddListener(OnLogout);
_linkGoogleBtn.onClick.AddListener(OnLinkGoogle);
_checkGoogleBtn.onClick.AddListener(OncheckGoogle);
_linkVkBtn.onClick.AddListener(OnLinkVkId);
_checkVkBtn.onClick.AddListener(OnCheckVKId);
_linkFacbookBtn.onClick.AddListener(OnLinkFacebook);
_linkAppleBtn.onClick.AddListener(OnLinkApple);
_checkFacbookBtn.onClick.AddListener(OncheckFacebook);
@@ -111,13 +90,11 @@ public class SDKTest : MonoBehaviour
_signoutBtn.onClick.AddListener(OnSignoutBtn);
_fbShareLinkBtn.onClick.AddListener(OnFBShareLinkBtn);
_mfbShareLinkBtn.onClick.AddListener(OnMessengerShareLinkBtn);
_reviewBtn.onClick.AddListener(OnReview);
Debug.Log("SDKTest Started");
}
void Init()
{
_messageTxt.text = "Initializing...";
TYSdkFacade.Instance.Init();
TDAnalytics.Init("0caf287574bd4a9bb08be8995705ef6f", "https://122-slg-online01.qijihdhk.com:8991");
@@ -137,19 +114,6 @@ public class SDKTest : MonoBehaviour
Debug.Log($"customId = {customId}, customId_2 = {customId_2}");
UnityBridgeFunc.UnityResetServerUrl("https://128-hwsfsdk-sdk-test01.qijihdhk.com");
GContext.container.Resolve<IConfig>().Set("PAY_VERIFY_URL", "https://192.168.9.91:7036/api/FlexionCallback");
}
private void UpdateChannelTitle()
{
#if UNITY_ANDROID
using (var cls = new AndroidJavaClass("com.unity3d.player.ChannelEntry"))
{
string channel = cls.GetStatic<string>("CHANNEL");
Debug.Log($"[SDKTest] Channel from Java: {channel}");
_titleText.text = $" {channel}";
}
#endif
}
int retryAttempt;
@@ -183,7 +147,6 @@ public class SDKTest : MonoBehaviour
_messageTxt.text = $"Login: {info.isSuccess}";
if (info.isSuccess)
{
_messageTxt.text += $" UserId:{info.userId}";
_messageTxt.text += $"\n{info.msg}";
_messageTxt.text += $"\n{TYSdkFacade.TYAccountInfo.token}";
}
@@ -210,23 +173,10 @@ public class SDKTest : MonoBehaviour
public async void OnPayTestBtn()
{
_messageTxt.text = "";
if (ChannelConfig.Channel.Equals("Flexion"))
{
sku = new SKUDetail
{
productId = "com.arkgame.ft.pack0199",
ourProductId = "com.arkgame.ft.pack0199",
price = "1.99",
price_amount_micros = "1990000",
title = "Flexion Test Pack",
type = "inapp"
};
}
if (sku == null){
_messageTxt.text = "no product";
return;
}
}
#if !UNITY_EDITOR && UNITY_IOS
sku.productId = "comarkgameftpack0199";
@@ -237,22 +187,11 @@ public class SDKTest : MonoBehaviour
var purchaseInfo = new JObject();
purchaseInfo["pfid"] = "TestPlayer";
purchaseInfo["customData"] = "{\"test\":\"test\"}";
// purchaseInfo["customData"] ="{\"BuyType\":{\"type\":1,\"ID\":100502,\"key\":null,\"endDay\":0,\"extraPurcheData\":null,\"IsHide\":false},\"IAPID\":302,\"ItemData\":[{\"id\":1005,\"curCount\":22728,\"count\":260}],\"ShowType\":8,\"CONTENT_ID\":\"com.arkgame.ft.pack0499\",\"PRICE\":4.99,\"CURRENCY\":\"USD\",\"ProdPrice\":4.99,\"extraPurcheData\":{\"purchase_count\":9,\"trade_name\":\"商店-钻石直充4.99\",\"trade_type\":\"商店-钻石直充\",\"usd_price\":4.99,\"iap_id\":302,\"drop_id\":1005,\"trade_group\":\"商店\",\"item_1005\":260},\"orderId\":null,\"time\":\"5/20/2026 3:59:07 AM\"}";
purchaseInfo["userId"] = TYSdkFacade.TYAccountInfo.strUserId;
PaymentInfo payResult = await TYSdkFacade.Instance.Pay(sku, 1, sku.ProdPrice, purchaseInfo);
_messageTxt.text = "\n" + $"Success : {payResult.isSuccess}";
_messageTxt.text += "\n" + $"message : {payResult.msg}";
_messageTxt.text += "\n" + $"orderId : {payResult.orderId}";
_messageTxt.text += "\n" + $"storeOrderId : {payResult.storeOrderId}";
var consumeToken = payResult.Receipt?.PurchaseToken ?? payResult.purchaseToken;
_messageTxt.text += "\n" + $"hasToken : {!string.IsNullOrEmpty(consumeToken)}";
if (!string.IsNullOrEmpty(consumeToken))
{
Debug.Log($"[SDKTest] Consume purchase token after pay result token={consumeToken}");
UnityBridgeFunc.ConsumePurchase(consumeToken);
_messageTxt.text += "\nconsume requested";
}
PaymentInfo payResult = await TYSdkFacade.Instance.Pay(sku, 1, sku.ProdPrice, purchaseInfo);
_messageTxt.text = "\n" + $"Success : {payResult.isSuccess}";
_messageTxt.text += "\n" + $"message : {payResult.msg}";
}
SKUDetail sku = null;
@@ -267,7 +206,6 @@ public class SDKTest : MonoBehaviour
_messageTxt.text = "products count:::" + result.products.Count;
_messageTxt.text += "\n" + result.products[0].ToString();
sku = result.products[0];
Debug.Log($"Sku -> {sku}");
}
else
{
@@ -398,13 +336,6 @@ eb68f93a08156e04
_messageTxt.text = $"\n link google account : {isSuccess}";
}
private async void OnLinkVkId()
{
_messageTxt.text = string.Empty;
var isSuccess = await TYSdkFacade.Instance.LinkAccount(EAccoutType.hwVkid);
_messageTxt.text = $"\n link VkId account : {isSuccess} {isSuccess.code}";
}
private async void OnLinkFacebook()
{
_messageTxt.text = string.Empty;
@@ -426,13 +357,6 @@ eb68f93a08156e04
_messageTxt.text = $"\n google account linked : {isSuccess}";
}
private async void OnCheckVKId()
{
_messageTxt.text = string.Empty;
var isSuccess = await TYSdkFacade.Instance.LinkCheck(EAccoutType.hwVkid);
_messageTxt.text = $"\n vk account linked : {isSuccess}";
}
private async void OncheckFacebook()
{
_messageTxt.text = string.Empty;
@@ -455,11 +379,6 @@ eb68f93a08156e04
UnityBridgeFunc.MessengerShareLink("title", "content", "https://www.baidu.com");
}
private void OnReview()
{
UnityBridgeFunc.Review();
}
/*
public void OnTaBtn()
{

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using tysdk;
using UnityEngine;
using UnityEngine.UI;
@@ -29,17 +28,13 @@ public class UnbindTest : MonoBehaviour
private Button getSnsBtn;
[SerializeField]
private Button rmSnsBtn;
[SerializeField]
private Button loginBySns;
private Button checkSnsBtn;
[SerializeField]
private Button bindBtn;
[SerializeField]
private Button changeBindBtn;
private Button unbindBtn;
private EAccoutType accoutType;
@@ -61,10 +56,9 @@ public class UnbindTest : MonoBehaviour
}); loginBtn.onClick.AddListener(OnLogin);
logoutBtn.onClick.AddListener(OnLogout);
getSnsBtn.onClick.AddListener(OnGetSns);
rmSnsBtn.onClick.AddListener(OnRmSns);
loginBySns.onClick.AddListener(OnLoginBySns);
checkSnsBtn.onClick.AddListener(OnCheckSns);
bindBtn.onClick.AddListener(OnBind);
changeBindBtn.onClick.AddListener(OnChangeBind);
unbindBtn.onClick.AddListener(OnUnbind);
Debug.Log("========== Init =============");
TYSdkFacade.Instance.Init();
Debug.Log($"AccoutType {accoutType}");
@@ -102,14 +96,7 @@ public class UnbindTest : MonoBehaviour
t.CallStatic("GetSns", accoutType.ToString());
}
private void OnRmSns()
{
Debug.Log("========== Get SNS =============");
using var t = new AndroidJavaClass(Cls);
t.CallStatic("RmSns") ;
}
private async void OnLoginBySns()
private async void OnCheckSns()
{
try
{
@@ -128,7 +115,6 @@ public class UnbindTest : MonoBehaviour
}
}
private int buserId;
private async void OnBind()
{
try
@@ -140,7 +126,6 @@ public class UnbindTest : MonoBehaviour
{
var info = await PlayFabTool.GetPFPlayerInfoBySDKId(linkResult.userId, "6DC6D");
Debug.Log(info?.ToString() ?? "[UnbindTest::OnBind] info is null");
buserId = linkResult.userId;
}
}
catch (Exception e)
@@ -149,17 +134,21 @@ public class UnbindTest : MonoBehaviour
}
}
private async void OnChangeBind()
public void BindCallback(string message)
{
try
}
private void OnUnbind()
{
using (var t = new AndroidJavaClass(Cls))
{
Debug.Log("========== Change Bind =============");
var result = await TYSdkFacade.Instance.ChangeLinkAccount(accoutType, buserId, loginInfo.userId);
Debug.Log($"Change Bind Result Code:{result.code}, UserId:{result.userId}, msg:{result.msg}");
}
catch (Exception e)
{
Debug.LogException(e);
t.CallStatic("Unbind");
}
}
public void UnbindCallback(string message)
{
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2e9e076a217436a47b4b81811b4505db
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,111 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe: Hierarchy 右键菜单创建视频播放器
//----------------------------------------------------------------*/
using UnityEngine;
using UnityEditor;
using UnityEngine.UI;
public static class LeviathanVideoMenu
{
/// <summary>
/// 创建 UI 视频播放器 (RawImage)
/// </summary>
[MenuItem("GameObject/Leviathan Video/Leviathan Video Player (UI)", false, 10)]
private static void CreateUIVideoPlayer(MenuCommand menuCommand)
{
// 创建 GameObject
GameObject go = new GameObject("LeviathanVideoPlayer");
// 添加 RectTransformUI 组件需要)
RectTransform rectTransform = go.AddComponent<RectTransform>();
rectTransform.sizeDelta = new Vector2(400, 300);
// 添加 RawImage 组件LeviathanVideoDecoder 需要)
RawImage rawImage = go.AddComponent<RawImage>();
rawImage.color = Color.white;
// 添加视频解码器组件
go.AddComponent<LeviathanVideoDecoder>();
// 设置父物体
GameObjectUtility.SetParentAndAlign(go, menuCommand.context as GameObject);
// 如果没有父物体,尝试放到 Canvas 下
if (go.transform.parent == null)
{
Canvas canvas = Object.FindObjectOfType<Canvas>();
if (canvas != null)
{
go.transform.SetParent(canvas.transform, false);
}
else
{
// 如果没有 Canvas创建一个
GameObject canvasGO = new GameObject("Canvas");
canvas = canvasGO.AddComponent<Canvas>();
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
canvasGO.AddComponent<CanvasScaler>();
canvasGO.AddComponent<GraphicRaycaster>();
go.transform.SetParent(canvas.transform, false);
}
}
// 注册撤销
Undo.RegisterCreatedObjectUndo(go, "Create Leviathan Video Player (UI)");
// 选中创建的对象
Selection.activeObject = go;
}
/// <summary>
/// 创建 3D 视频播放器 (Cube)
/// </summary>
[MenuItem("GameObject/Leviathan Video/Leviathan Video Player (3D Cube)", false, 11)]
private static void Create3DVideoPlayerCube(MenuCommand menuCommand)
{
// 创建 Cube
GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube);
go.name = "LeviathanVideoPlayer3D";
// 添加视频渲染器组件
go.AddComponent<LeviathanVideo3DRenderer>();
// 设置父物体
GameObjectUtility.SetParentAndAlign(go, menuCommand.context as GameObject);
// 注册撤销
Undo.RegisterCreatedObjectUndo(go, "Create Leviathan Video Player (3D Cube)");
// 选中创建的对象
Selection.activeObject = go;
}
/// <summary>
/// 创建 3D 视频播放器 (Quad/Plane)
/// </summary>
[MenuItem("GameObject/Leviathan Video/Leviathan Video Player (3D Quad)", false, 12)]
private static void Create3DVideoPlayerQuad(MenuCommand menuCommand)
{
// 创建 Quad
GameObject go = GameObject.CreatePrimitive(PrimitiveType.Quad);
go.name = "LeviathanVideoPlayer3D";
// 添加视频渲染器组件
go.AddComponent<LeviathanVideo3DRenderer>();
// 设置父物体
GameObjectUtility.SetParentAndAlign(go, menuCommand.context as GameObject);
// 注册撤销
Undo.RegisterCreatedObjectUndo(go, "Create Leviathan Video Player (3D Quad)");
// 选中创建的对象
Selection.activeObject = go;
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c7bad621141fb304caceb22ea91d7db3
guid: d7270087496e8e04a9f7984720cd2362
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -0,0 +1,125 @@
#if UNITY_WEBGL
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using UnityEngine;
using System.IO;
namespace LeviathanVideo.Editor
{
public static class WeChatMiniGameMenu
{
private const string SourcePath = "Assets/WX-WASM-SDK-V2-v0.1.32~";
private const string TargetPath = "Assets/WX-WASM-SDK-V2";
private const string LeviathanWasmPath = "Assets/WX-WASM-SDK-V2/Editor/template/minigame/leviathan.wasm.br";
private const string WeChatSDKGitUrl = "https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git";
private static AddRequest _addRequest;
// 验证函数:只在 WX-WASM-SDK-V2 文件夹不存在时启用
[MenuItem("微信小游戏/[LeviathanVideo] SDK", true)]
public static bool ValidateInstallWeChatSDK()
{
return !Directory.Exists(TargetPath);
}
[MenuItem("微信小游戏/[LeviathanVideo] SDK", false)]
public static void InstallWeChatSDK()
{
Debug.Log($"[LeviathanVideo] 开始安装微信SDK: {WeChatSDKGitUrl}");
_addRequest = Client.Add(WeChatSDKGitUrl);
EditorApplication.update += OnInstallProgress;
}
private static void OnInstallProgress()
{
if (_addRequest == null || !_addRequest.IsCompleted)
return;
EditorApplication.update -= OnInstallProgress;
if (_addRequest.Status == StatusCode.Success)
{
Debug.Log($"[LeviathanVideo] 微信SDK安装成功: {_addRequest.Result.packageId}");
EditorUtility.DisplayDialog("安装成功",
$"微信小游戏SDK安装成功!\n\n包ID: {_addRequest.Result.packageId}\n\n请执行下一步操作:\n微信小游戏 -> [LeviathanVideo] ****首次安装微信SDK后需要执行此操作****",
"确定");
}
else if (_addRequest.Status >= StatusCode.Failure)
{
Debug.LogError($"[LeviathanVideo] 微信SDK安装失败: {_addRequest.Error.message}");
EditorUtility.DisplayDialog("安装失败", $"微信小游戏SDK安装失败!\n\n错误: {_addRequest.Error.message}", "确定");
}
_addRequest = null;
}
// 验证函数:只在 leviathan.wasm.br 文件不存在时启用
[MenuItem("微信小游戏/[LeviathanVideo] ****SDK后需要执行此操作**** ", true)]
public static bool ValidateCopyFiles()
{
// 需要 SDK 已安装 且 leviathan.wasm.br 文件不存在
return Directory.Exists(TargetPath) && !File.Exists(LeviathanWasmPath);
}
[MenuItem("微信小游戏/[LeviathanVideo] ****SDK后需要执行此操作**** ", false)]
public static void CopyFiles()
{
string sourcePath = Path.GetFullPath(SourcePath);
string targetPath = Path.GetFullPath(TargetPath);
if (!Directory.Exists(sourcePath))
{
EditorUtility.DisplayDialog("错误", $"源路径不存在: {sourcePath}", "确定");
return;
}
if (!Directory.Exists(targetPath))
{
EditorUtility.DisplayDialog("错误", $"目标路径不存在: {targetPath}", "确定");
return;
}
try
{
CopyDirectory(sourcePath, targetPath);
AssetDatabase.Refresh();
EditorUtility.DisplayDialog("完成", $"已将文件从\n{SourcePath}\n复制到\n{TargetPath}", "确定");
Debug.Log($"[Leviathan] 文件复制完成: {SourcePath} -> {TargetPath}");
}
catch (System.Exception e)
{
EditorUtility.DisplayDialog("错误", $"复制文件时出错: {e.Message}", "确定");
Debug.LogError($"[Leviathan] 复制文件失败: {e}");
}
}
private static void CopyDirectory(string sourceDir, string targetDir)
{
// 复制所有文件
foreach (string file in Directory.GetFiles(sourceDir))
{
string fileName = Path.GetFileName(file);
string destFile = Path.Combine(targetDir, fileName);
File.Copy(file, destFile, true);
Debug.Log($"[Leviathan] 复制文件: {fileName}");
}
// 递归复制所有子目录
foreach (string dir in Directory.GetDirectories(sourceDir))
{
string dirName = Path.GetFileName(dir);
string destDir = Path.Combine(targetDir, dirName);
if (!Directory.Exists(destDir))
{
Directory.CreateDirectory(destDir);
}
CopyDirectory(dir, destDir);
}
}
}
}
#endif

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6dcc4e666f5907a47b1843de49da6f67
guid: 00d9ffb1d338f3a47a581531161a43da
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b7ba47a303ab5a54aa50ce9e0ef18967
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b493b78c71ed7fe49951c8084f0f8b2a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,629 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
using System;
namespace LeviathanVideo.Abstractions
{
public unsafe struct AVRational2 : IFixedArray<AVRational>
{
public static readonly int ArrayLength = 2;
public int Length => 2;
AVRational _0; AVRational _1;
public AVRational this[uint i]
{
get { if (i >= 2) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 2) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { *(p0 + i) = value; } }
}
public AVRational[] ToArray()
{
fixed (AVRational* p0 = &_0) { var a = new AVRational[2]; for (uint i = 0; i < 2; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVRational[] array)
{
fixed (AVRational* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 2) return; } }
}
public static implicit operator AVRational[](AVRational2 @struct) => @struct.ToArray();
}
public unsafe struct short2 : IFixedArray<short>
{
public static readonly int ArrayLength = 2;
public int Length => 2;
fixed short _[2];
public short this[uint i]
{
get => _[i];
set => _[i] = value;
}
public short[] ToArray()
{
var a = new short[2]; for (uint i = 0; i < 2; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(short[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 2) return; }
}
public static implicit operator short[](short2 @struct) => @struct.ToArray();
}
public unsafe struct void_ptr2 : IFixedArray
{
public static readonly int ArrayLength = 2;
public int Length => 2;
void* _0; void* _1;
public void* this[uint i]
{
get { if (i >= 2) throw new ArgumentOutOfRangeException(); fixed (void** p0 = &_0) { return *(p0 + i); } }
set { if (i >= 2) throw new ArgumentOutOfRangeException(); fixed (void** p0 = &_0) { *(p0 + i) = value; } }
}
public void*[] ToArray()
{
fixed (void** p0 = &_0) { var a = new void*[2]; for (uint i = 0; i < 2; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(void*[] array)
{
fixed (void** p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 2) return; } }
}
public static implicit operator void*[](void_ptr2 @struct) => @struct.ToArray();
}
public unsafe struct AVHDRPlusColorTransformParams3 : IFixedArray<AVHDRPlusColorTransformParams>
{
public static readonly int ArrayLength = 3;
public int Length => 3;
AVHDRPlusColorTransformParams _0; AVHDRPlusColorTransformParams _1; AVHDRPlusColorTransformParams _2;
public AVHDRPlusColorTransformParams this[uint i]
{
get { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (AVHDRPlusColorTransformParams* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (AVHDRPlusColorTransformParams* p0 = &_0) { *(p0 + i) = value; } }
}
public AVHDRPlusColorTransformParams[] ToArray()
{
fixed (AVHDRPlusColorTransformParams* p0 = &_0) { var a = new AVHDRPlusColorTransformParams[3]; for (uint i = 0; i < 3; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVHDRPlusColorTransformParams[] array)
{
fixed (AVHDRPlusColorTransformParams* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 3) return; } }
}
public static implicit operator AVHDRPlusColorTransformParams[](AVHDRPlusColorTransformParams3 @struct) => @struct.ToArray();
}
public unsafe struct AVRational3 : IFixedArray<AVRational>
{
public static readonly int ArrayLength = 3;
public int Length => 3;
AVRational _0; AVRational _1; AVRational _2;
public AVRational this[uint i]
{
get { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { *(p0 + i) = value; } }
}
public AVRational[] ToArray()
{
fixed (AVRational* p0 = &_0) { var a = new AVRational[3]; for (uint i = 0; i < 3; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVRational[] array)
{
fixed (AVRational* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 3) return; } }
}
public static implicit operator AVRational[](AVRational3 @struct) => @struct.ToArray();
}
public unsafe struct AVRational3x2 : IFixedArray<AVRational2>
{
public static readonly int ArrayLength = 3;
public int Length => 3;
AVRational2 _0; AVRational2 _1; AVRational2 _2;
public AVRational2 this[uint i]
{
get { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (AVRational2* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (AVRational2* p0 = &_0) { *(p0 + i) = value; } }
}
public AVRational2[] ToArray()
{
fixed (AVRational2* p0 = &_0) { var a = new AVRational2[3]; for (uint i = 0; i < 3; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVRational2[] array)
{
fixed (AVRational2* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 3) return; } }
}
public static implicit operator AVRational2[](AVRational3x2 @struct) => @struct.ToArray();
}
public unsafe struct byte_ptr3 : IFixedArray
{
public static readonly int ArrayLength = 3;
public int Length => 3;
byte* _0; byte* _1; byte* _2;
public byte* this[uint i]
{
get { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (byte** p0 = &_0) { return *(p0 + i); } }
set { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (byte** p0 = &_0) { *(p0 + i) = value; } }
}
public byte*[] ToArray()
{
fixed (byte** p0 = &_0) { var a = new byte*[3]; for (uint i = 0; i < 3; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(byte*[] array)
{
fixed (byte** p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 3) return; } }
}
public static implicit operator byte*[](byte_ptr3 @struct) => @struct.ToArray();
}
public unsafe struct int3 : IFixedArray<int>
{
public static readonly int ArrayLength = 3;
public int Length => 3;
fixed int _[3];
public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[3]; for (uint i = 0; i < 3; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 3) return; }
}
public static implicit operator int[](int3 @struct) => @struct.ToArray();
}
public unsafe struct short3x2 : IFixedArray<short2>
{
public static readonly int ArrayLength = 3;
public int Length => 3;
short2 _0; short2 _1; short2 _2;
public short2 this[uint i]
{
get { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (short2* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 3) throw new ArgumentOutOfRangeException(); fixed (short2* p0 = &_0) { *(p0 + i) = value; } }
}
public short2[] ToArray()
{
fixed (short2* p0 = &_0) { var a = new short2[3]; for (uint i = 0; i < 3; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(short2[] array)
{
fixed (short2* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 3) return; } }
}
public static implicit operator short2[](short3x2 @struct) => @struct.ToArray();
}
public unsafe struct AVComponentDescriptor4 : IFixedArray<AVComponentDescriptor>
{
public static readonly int ArrayLength = 4;
public int Length => 4;
AVComponentDescriptor _0; AVComponentDescriptor _1; AVComponentDescriptor _2; AVComponentDescriptor _3;
public AVComponentDescriptor this[uint i]
{
get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (AVComponentDescriptor* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (AVComponentDescriptor* p0 = &_0) { *(p0 + i) = value; } }
}
public AVComponentDescriptor[] ToArray()
{
fixed (AVComponentDescriptor* p0 = &_0) { var a = new AVComponentDescriptor[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVComponentDescriptor[] array)
{
fixed (AVComponentDescriptor* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 4) return; } }
}
public static implicit operator AVComponentDescriptor[](AVComponentDescriptor4 @struct) => @struct.ToArray();
}
public unsafe struct byte_ptr4 : IFixedArray
{
public static readonly int ArrayLength = 4;
public int Length => 4;
byte* _0; byte* _1; byte* _2; byte* _3;
public byte* this[uint i]
{
get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (byte** p0 = &_0) { return *(p0 + i); } }
set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (byte** p0 = &_0) { *(p0 + i) = value; } }
}
public byte*[] ToArray()
{
fixed (byte** p0 = &_0) { var a = new byte*[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(byte*[] array)
{
fixed (byte** p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 4) return; } }
}
public static implicit operator byte*[](byte_ptr4 @struct) => @struct.ToArray();
}
public unsafe struct byte4 : IFixedArray<byte>
{
public static readonly int ArrayLength = 4;
public int Length => 4;
fixed byte _[4];
public byte this[uint i]
{
get => _[i];
set => _[i] = value;
}
public byte[] ToArray()
{
var a = new byte[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(byte[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 4) return; }
}
public static implicit operator byte[](byte4 @struct) => @struct.ToArray();
}
public unsafe struct int4 : IFixedArray<int>
{
public static readonly int ArrayLength = 4;
public int Length => 4;
fixed int _[4];
public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 4) return; }
}
public static implicit operator int[](int4 @struct) => @struct.ToArray();
}
public unsafe struct long4 : IFixedArray<long>
{
public static readonly int ArrayLength = 4;
public int Length => 4;
fixed long _[4];
public long this[uint i]
{
get => _[i];
set => _[i] = value;
}
public long[] ToArray()
{
var a = new long[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(long[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 4) return; }
}
public static implicit operator long[](long4 @struct) => @struct.ToArray();
}
public unsafe struct uint4 : IFixedArray<uint>
{
public static readonly int ArrayLength = 4;
public int Length => 4;
fixed uint _[4];
public uint this[uint i]
{
get => _[i];
set => _[i] = value;
}
public uint[] ToArray()
{
var a = new uint[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(uint[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 4) return; }
}
public static implicit operator uint[](uint4 @struct) => @struct.ToArray();
}
public unsafe struct ulong4 : IFixedArray<ulong>
{
public static readonly int ArrayLength = 4;
public int Length => 4;
fixed ulong _[4];
public ulong this[uint i]
{
get => _[i];
set => _[i] = value;
}
public ulong[] ToArray()
{
var a = new ulong[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(ulong[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 4) return; }
}
public static implicit operator ulong[](ulong4 @struct) => @struct.ToArray();
}
public unsafe struct int7 : IFixedArray<int>
{
public static readonly int ArrayLength = 7;
public int Length => 7;
fixed int _[7];
public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[7]; for (uint i = 0; i < 7; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 7) return; }
}
public static implicit operator int[](int7 @struct) => @struct.ToArray();
}
public unsafe struct AVBufferRef_ptr8 : IFixedArray
{
public static readonly int ArrayLength = 8;
public int Length => 8;
AVBufferRef* _0; AVBufferRef* _1; AVBufferRef* _2; AVBufferRef* _3; AVBufferRef* _4; AVBufferRef* _5; AVBufferRef* _6; AVBufferRef* _7;
public AVBufferRef* this[uint i]
{
get { if (i >= 8) throw new ArgumentOutOfRangeException(); fixed (AVBufferRef** p0 = &_0) { return *(p0 + i); } }
set { if (i >= 8) throw new ArgumentOutOfRangeException(); fixed (AVBufferRef** p0 = &_0) { *(p0 + i) = value; } }
}
public AVBufferRef*[] ToArray()
{
fixed (AVBufferRef** p0 = &_0) { var a = new AVBufferRef*[8]; for (uint i = 0; i < 8; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVBufferRef*[] array)
{
fixed (AVBufferRef** p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 8) return; } }
}
public static implicit operator AVBufferRef*[](AVBufferRef_ptr8 @struct) => @struct.ToArray();
}
public unsafe struct byte_ptr8 : IFixedArray
{
public static readonly int ArrayLength = 8;
public int Length => 8;
byte* _0; byte* _1; byte* _2; byte* _3; byte* _4; byte* _5; byte* _6; byte* _7;
public byte* this[uint i]
{
get { if (i >= 8) throw new ArgumentOutOfRangeException(); fixed (byte** p0 = &_0) { return *(p0 + i); } }
set { if (i >= 8) throw new ArgumentOutOfRangeException(); fixed (byte** p0 = &_0) { *(p0 + i) = value; } }
}
public byte*[] ToArray()
{
fixed (byte** p0 = &_0) { var a = new byte*[8]; for (uint i = 0; i < 8; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(byte*[] array)
{
fixed (byte** p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 8) return; } }
}
public static implicit operator byte*[](byte_ptr8 @struct) => @struct.ToArray();
}
public unsafe struct byte8 : IFixedArray<byte>
{
public static readonly int ArrayLength = 8;
public int Length => 8;
fixed byte _[8];
public byte this[uint i]
{
get => _[i];
set => _[i] = value;
}
public byte[] ToArray()
{
var a = new byte[8]; for (uint i = 0; i < 8; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(byte[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 8) return; }
}
public static implicit operator byte[](byte8 @struct) => @struct.ToArray();
}
public unsafe struct int8 : IFixedArray<int>
{
public static readonly int ArrayLength = 8;
public int Length => 8;
fixed int _[8];
public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[8]; for (uint i = 0; i < 8; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 8) return; }
}
public static implicit operator int[](int8 @struct) => @struct.ToArray();
}
public unsafe struct ulong8 : IFixedArray<ulong>
{
public static readonly int ArrayLength = 8;
public int Length => 8;
fixed ulong _[8];
public ulong this[uint i]
{
get => _[i];
set => _[i] = value;
}
public ulong[] ToArray()
{
var a = new ulong[8]; for (uint i = 0; i < 8; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(ulong[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 8) return; }
}
public static implicit operator ulong[](ulong8 @struct) => @struct.ToArray();
}
public unsafe struct int9 : IFixedArray<int>
{
public static readonly int ArrayLength = 9;
public int Length => 9;
fixed int _[9];
public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[9]; for (uint i = 0; i < 9; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 9) return; }
}
public static implicit operator int[](int9 @struct) => @struct.ToArray();
}
public unsafe struct AVHDRPlusPercentile15 : IFixedArray<AVHDRPlusPercentile>
{
public static readonly int ArrayLength = 15;
public int Length => 15;
AVHDRPlusPercentile _0; AVHDRPlusPercentile _1; AVHDRPlusPercentile _2; AVHDRPlusPercentile _3; AVHDRPlusPercentile _4; AVHDRPlusPercentile _5; AVHDRPlusPercentile _6; AVHDRPlusPercentile _7; AVHDRPlusPercentile _8; AVHDRPlusPercentile _9; AVHDRPlusPercentile _10; AVHDRPlusPercentile _11; AVHDRPlusPercentile _12; AVHDRPlusPercentile _13; AVHDRPlusPercentile _14;
public AVHDRPlusPercentile this[uint i]
{
get { if (i >= 15) throw new ArgumentOutOfRangeException(); fixed (AVHDRPlusPercentile* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 15) throw new ArgumentOutOfRangeException(); fixed (AVHDRPlusPercentile* p0 = &_0) { *(p0 + i) = value; } }
}
public AVHDRPlusPercentile[] ToArray()
{
fixed (AVHDRPlusPercentile* p0 = &_0) { var a = new AVHDRPlusPercentile[15]; for (uint i = 0; i < 15; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVHDRPlusPercentile[] array)
{
fixed (AVHDRPlusPercentile* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 15) return; } }
}
public static implicit operator AVHDRPlusPercentile[](AVHDRPlusPercentile15 @struct) => @struct.ToArray();
}
public unsafe struct AVRational15 : IFixedArray<AVRational>
{
public static readonly int ArrayLength = 15;
public int Length => 15;
AVRational _0; AVRational _1; AVRational _2; AVRational _3; AVRational _4; AVRational _5; AVRational _6; AVRational _7; AVRational _8; AVRational _9; AVRational _10; AVRational _11; AVRational _12; AVRational _13; AVRational _14;
public AVRational this[uint i]
{
get { if (i >= 15) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 15) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { *(p0 + i) = value; } }
}
public AVRational[] ToArray()
{
fixed (AVRational* p0 = &_0) { var a = new AVRational[15]; for (uint i = 0; i < 15; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVRational[] array)
{
fixed (AVRational* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 15) return; } }
}
public static implicit operator AVRational[](AVRational15 @struct) => @struct.ToArray();
}
public unsafe struct byte16 : IFixedArray<byte>
{
public static readonly int ArrayLength = 16;
public int Length => 16;
fixed byte _[16];
public byte this[uint i]
{
get => _[i];
set => _[i] = value;
}
public byte[] ToArray()
{
var a = new byte[16]; for (uint i = 0; i < 16; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(byte[] array)
{
uint i = 0; foreach (var value in array) { _[i++] = value; if (i >= 16) return; }
}
public static implicit operator byte[](byte16 @struct) => @struct.ToArray();
}
public unsafe struct AVRational25 : IFixedArray<AVRational>
{
public static readonly int ArrayLength = 25;
public int Length => 25;
AVRational _0; AVRational _1; AVRational _2; AVRational _3; AVRational _4; AVRational _5; AVRational _6; AVRational _7; AVRational _8; AVRational _9; AVRational _10; AVRational _11; AVRational _12; AVRational _13; AVRational _14; AVRational _15; AVRational _16; AVRational _17; AVRational _18; AVRational _19; AVRational _20; AVRational _21; AVRational _22; AVRational _23; AVRational _24;
public AVRational this[uint i]
{
get { if (i >= 25) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 25) throw new ArgumentOutOfRangeException(); fixed (AVRational* p0 = &_0) { *(p0 + i) = value; } }
}
public AVRational[] ToArray()
{
fixed (AVRational* p0 = &_0) { var a = new AVRational[25]; for (uint i = 0; i < 25; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVRational[] array)
{
fixed (AVRational* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 25) return; } }
}
public static implicit operator AVRational[](AVRational25 @struct) => @struct.ToArray();
}
public unsafe struct AVRational25x25 : IFixedArray<AVRational25>
{
public static readonly int ArrayLength = 25;
public int Length => 25;
AVRational25 _0; AVRational25 _1; AVRational25 _2; AVRational25 _3; AVRational25 _4; AVRational25 _5; AVRational25 _6; AVRational25 _7; AVRational25 _8; AVRational25 _9; AVRational25 _10; AVRational25 _11; AVRational25 _12; AVRational25 _13; AVRational25 _14; AVRational25 _15; AVRational25 _16; AVRational25 _17; AVRational25 _18; AVRational25 _19; AVRational25 _20; AVRational25 _21; AVRational25 _22; AVRational25 _23; AVRational25 _24;
public AVRational25 this[uint i]
{
get { if (i >= 25) throw new ArgumentOutOfRangeException(); fixed (AVRational25* p0 = &_0) { return *(p0 + i); } }
set { if (i >= 25) throw new ArgumentOutOfRangeException(); fixed (AVRational25* p0 = &_0) { *(p0 + i) = value; } }
}
public AVRational25[] ToArray()
{
fixed (AVRational25* p0 = &_0) { var a = new AVRational25[25]; for (uint i = 0; i < 25; i++) a[i] = *(p0 + i); return a; }
}
public void UpdateFrom(AVRational25[] array)
{
fixed (AVRational25* p0 = &_0) { uint i = 0; foreach (var value in array) { *(p0 + i++) = value; if (i >= 25) return; } }
}
public static implicit operator AVRational25[](AVRational25x25 @struct) => @struct.ToArray();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8672a701b738a1c409125f98c38b79d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
using System;
using System.Runtime.InteropServices;
namespace LeviathanVideo.Abstractions
{
public class ConstCharPtrMarshaler : ICustomMarshaler
{
private static readonly ConstCharPtrMarshaler Instance = new ConstCharPtrMarshaler();
public object MarshalNativeToManaged(IntPtr pNativeData) => Marshal.PtrToStringAnsi(pNativeData);
public IntPtr MarshalManagedToNative(object managedObj) => IntPtr.Zero;
public void CleanUpNativeData(IntPtr pNativeData)
{
}
public void CleanUpManagedData(object managedObj)
{
}
public int GetNativeDataSize() => IntPtr.Size;
public static ICustomMarshaler GetInstance(string cookie) => Instance;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a6182afb215f53b409c298aeb135d0a9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,460 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
using System;
using System.Runtime.InteropServices;
namespace LeviathanVideo.Abstractions
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int _query_func(AVFilterContext* @p0);
public unsafe struct _query_func_func
{
public IntPtr Pointer;
public static implicit operator _query_func_func(_query_func func) => new _query_func_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void av_buffer_create_free(void* @opaque, byte* @data);
public unsafe struct av_buffer_create_free_func
{
public IntPtr Pointer;
public static implicit operator av_buffer_create_free_func(av_buffer_create_free func) => new av_buffer_create_free_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate AVBufferRef* av_buffer_pool_init_alloc(ulong @size);
public unsafe struct av_buffer_pool_init_alloc_func
{
public IntPtr Pointer;
public static implicit operator av_buffer_pool_init_alloc_func(av_buffer_pool_init_alloc func) => new av_buffer_pool_init_alloc_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate AVBufferRef* av_buffer_pool_init2_alloc(void* @opaque, ulong @size);
public unsafe struct av_buffer_pool_init2_alloc_func
{
public IntPtr Pointer;
public static implicit operator av_buffer_pool_init2_alloc_func(av_buffer_pool_init2_alloc func) => new av_buffer_pool_init2_alloc_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void av_buffer_pool_init2_pool_free(void* @opaque);
public unsafe struct av_buffer_pool_init2_pool_free_func
{
public IntPtr Pointer;
public static implicit operator av_buffer_pool_init2_pool_free_func(av_buffer_pool_init2_pool_free func) => new av_buffer_pool_init2_pool_free_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void av_log_set_callback_callback(void* @p0, int @p1,
#if NETSTANDARD2_1_OR_GREATER
[MarshalAs(UnmanagedType.LPUTF8Str)]
#else
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]
#endif
string @p2, byte* @p3);
public unsafe struct av_log_set_callback_callback_func
{
public IntPtr Pointer;
public static implicit operator av_log_set_callback_callback_func(av_log_set_callback_callback func) => new av_log_set_callback_callback_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int av_tree_enumerate_cmp(void* @opaque, void* @elem);
public unsafe struct av_tree_enumerate_cmp_func
{
public IntPtr Pointer;
public static implicit operator av_tree_enumerate_cmp_func(av_tree_enumerate_cmp func) => new av_tree_enumerate_cmp_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int av_tree_enumerate_enu(void* @opaque, void* @elem);
public unsafe struct av_tree_enumerate_enu_func
{
public IntPtr Pointer;
public static implicit operator av_tree_enumerate_enu_func(av_tree_enumerate_enu func) => new av_tree_enumerate_enu_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int av_tree_find_cmp(void* @key, void* @b);
public unsafe struct av_tree_find_cmp_func
{
public IntPtr Pointer;
public static implicit operator av_tree_find_cmp_func(av_tree_find_cmp func) => new av_tree_find_cmp_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int av_tree_insert_cmp(void* @key, void* @b);
public unsafe struct av_tree_insert_cmp_func
{
public IntPtr Pointer;
public static implicit operator av_tree_insert_cmp_func(av_tree_insert_cmp func) => new av_tree_insert_cmp_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate AVClass* AVClass_child_class_iterate(void** @iter);
public unsafe struct AVClass_child_class_iterate_func
{
public IntPtr Pointer;
public static implicit operator AVClass_child_class_iterate_func(AVClass_child_class_iterate func) => new AVClass_child_class_iterate_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void* AVClass_child_next(void* @obj, void* @prev);
public unsafe struct AVClass_child_next_func
{
public IntPtr Pointer;
public static implicit operator AVClass_child_next_func(AVClass_child_next func) => new AVClass_child_next_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate AVClassCategory AVClass_get_category(void* @ctx);
public unsafe struct AVClass_get_category_func
{
public IntPtr Pointer;
public static implicit operator AVClass_get_category_func(AVClass_get_category func) => new AVClass_get_category_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate string AVClass_item_name(void* @ctx);
public unsafe struct AVClass_item_name_func
{
public IntPtr Pointer;
public static implicit operator AVClass_item_name_func(AVClass_item_name func) => new AVClass_item_name_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVClass_query_ranges(AVOptionRanges** @p0, void* @obj,
#if NETSTANDARD2_1_OR_GREATER
[MarshalAs(UnmanagedType.LPUTF8Str)]
#else
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]
#endif
string @key, int @flags);
public unsafe struct AVClass_query_ranges_func
{
public IntPtr Pointer;
public static implicit operator AVClass_query_ranges_func(AVClass_query_ranges func) => new AVClass_query_ranges_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int avcodec_default_execute_func(AVCodecContext* @c2, void* @arg2);
public unsafe struct avcodec_default_execute_func_func
{
public IntPtr Pointer;
public static implicit operator avcodec_default_execute_func_func(avcodec_default_execute_func func) => new avcodec_default_execute_func_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int avcodec_default_execute2_func(AVCodecContext* @c2, void* @arg2, int @p2, int @p3);
public unsafe struct avcodec_default_execute2_func_func
{
public IntPtr Pointer;
public static implicit operator avcodec_default_execute2_func_func(avcodec_default_execute2_func func) => new avcodec_default_execute2_func_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVCodecContext_draw_horiz_band(AVCodecContext* @s, AVFrame* @src, ref int8 @offset, int @y, int @type, int @height);
public unsafe struct AVCodecContext_draw_horiz_band_func
{
public IntPtr Pointer;
public static implicit operator AVCodecContext_draw_horiz_band_func(AVCodecContext_draw_horiz_band func) => new AVCodecContext_draw_horiz_band_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecContext_execute(AVCodecContext* @c, func_func @func, void* @arg2, int* @ret, int @count, int @size);
public unsafe struct AVCodecContext_execute_func
{
public IntPtr Pointer;
public static implicit operator AVCodecContext_execute_func(AVCodecContext_execute func) => new AVCodecContext_execute_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecContext_execute2(AVCodecContext* @c, func_func @func, void* @arg2, int* @ret, int @count);
public unsafe struct AVCodecContext_execute2_func
{
public IntPtr Pointer;
public static implicit operator AVCodecContext_execute2_func(AVCodecContext_execute2 func) => new AVCodecContext_execute2_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecContext_get_buffer2(AVCodecContext* @s, AVFrame* @frame, int @flags);
public unsafe struct AVCodecContext_get_buffer2_func
{
public IntPtr Pointer;
public static implicit operator AVCodecContext_get_buffer2_func(AVCodecContext_get_buffer2 func) => new AVCodecContext_get_buffer2_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecContext_get_encode_buffer(AVCodecContext* @s, AVPacket* @pkt, int @flags);
public unsafe struct AVCodecContext_get_encode_buffer_func
{
public IntPtr Pointer;
public static implicit operator AVCodecContext_get_encode_buffer_func(AVCodecContext_get_encode_buffer func) => new AVCodecContext_get_encode_buffer_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate AVPixelFormat AVCodecContext_get_format(AVCodecContext* @s, AVPixelFormat* @fmt);
public unsafe struct AVCodecContext_get_format_func
{
public IntPtr Pointer;
public static implicit operator AVCodecContext_get_format_func(AVCodecContext_get_format func) => new AVCodecContext_get_format_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVCodecParser_parser_close(AVCodecParserContext* @s);
public unsafe struct AVCodecParser_parser_close_func
{
public IntPtr Pointer;
public static implicit operator AVCodecParser_parser_close_func(AVCodecParser_parser_close func) => new AVCodecParser_parser_close_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecParser_parser_init(AVCodecParserContext* @s);
public unsafe struct AVCodecParser_parser_init_func
{
public IntPtr Pointer;
public static implicit operator AVCodecParser_parser_init_func(AVCodecParser_parser_init func) => new AVCodecParser_parser_init_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecParser_parser_parse(AVCodecParserContext* @s, AVCodecContext* @avctx, byte** @poutbuf, int* @poutbuf_size, byte* @buf, int @buf_size);
public unsafe struct AVCodecParser_parser_parse_func
{
public IntPtr Pointer;
public static implicit operator AVCodecParser_parser_parse_func(AVCodecParser_parser_parse func) => new AVCodecParser_parser_parse_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecParser_split(AVCodecContext* @avctx, byte* @buf, int @buf_size);
public unsafe struct AVCodecParser_split_func
{
public IntPtr Pointer;
public static implicit operator AVCodecParser_split_func(AVCodecParser_split func) => new AVCodecParser_split_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVD3D11VADeviceContext_lock(void* @lock_ctx);
public unsafe struct AVD3D11VADeviceContext_lock_func
{
public IntPtr Pointer;
public static implicit operator AVD3D11VADeviceContext_lock_func(AVD3D11VADeviceContext_lock func) => new AVD3D11VADeviceContext_lock_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVD3D11VADeviceContext_unlock(void* @lock_ctx);
public unsafe struct AVD3D11VADeviceContext_unlock_func
{
public IntPtr Pointer;
public static implicit operator AVD3D11VADeviceContext_unlock_func(AVD3D11VADeviceContext_unlock func) => new AVD3D11VADeviceContext_unlock_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFilter_activate(AVFilterContext* @ctx);
public unsafe struct AVFilter_activate_func
{
public IntPtr Pointer;
public static implicit operator AVFilter_activate_func(AVFilter_activate func) => new AVFilter_activate_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFilter_init(AVFilterContext* @ctx);
public unsafe struct AVFilter_init_func
{
public IntPtr Pointer;
public static implicit operator AVFilter_init_func(AVFilter_init func) => new AVFilter_init_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFilter_preinit(AVFilterContext* @ctx);
public unsafe struct AVFilter_preinit_func
{
public IntPtr Pointer;
public static implicit operator AVFilter_preinit_func(AVFilter_preinit func) => new AVFilter_preinit_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFilter_process_command(AVFilterContext* @p0,
#if NETSTANDARD2_1_OR_GREATER
[MarshalAs(UnmanagedType.LPUTF8Str)]
#else
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]
#endif
string @cmd,
#if NETSTANDARD2_1_OR_GREATER
[MarshalAs(UnmanagedType.LPUTF8Str)]
#else
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]
#endif
string @arg, byte* @res, int @res_len, int @flags);
public unsafe struct AVFilter_process_command_func
{
public IntPtr Pointer;
public static implicit operator AVFilter_process_command_func(AVFilter_process_command func) => new AVFilter_process_command_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVFilter_uninit(AVFilterContext* @ctx);
public unsafe struct AVFilter_uninit_func
{
public IntPtr Pointer;
public static implicit operator AVFilter_uninit_func(AVFilter_uninit func) => new AVFilter_uninit_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFilterGraph_execute(AVFilterContext* @ctx, func_func @func, void* @arg, int* @ret, int @nb_jobs);
public unsafe struct AVFilterGraph_execute_func
{
public IntPtr Pointer;
public static implicit operator AVFilterGraph_execute_func(AVFilterGraph_execute func) => new AVFilterGraph_execute_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFormatContext_control_message_cb(AVFormatContext* @s, int @type, void* @data, ulong @data_size);
public unsafe struct AVFormatContext_control_message_cb_func
{
public IntPtr Pointer;
public static implicit operator AVFormatContext_control_message_cb_func(AVFormatContext_control_message_cb func) => new AVFormatContext_control_message_cb_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFormatContext_io_close2(AVFormatContext* @s, AVIOContext* @pb);
public unsafe struct AVFormatContext_io_close2_func
{
public IntPtr Pointer;
public static implicit operator AVFormatContext_io_close2_func(AVFormatContext_io_close2 func) => new AVFormatContext_io_close2_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVFormatContext_io_open(AVFormatContext* @s, AVIOContext** @pb,
#if NETSTANDARD2_1_OR_GREATER
[MarshalAs(UnmanagedType.LPUTF8Str)]
#else
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]
#endif
string @url, int @flags, AVDictionary** @options);
public unsafe struct AVFormatContext_io_open_func
{
public IntPtr Pointer;
public static implicit operator AVFormatContext_io_open_func(AVFormatContext_io_open func) => new AVFormatContext_io_open_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVHWDeviceContext_free(AVHWDeviceContext* @ctx);
public unsafe struct AVHWDeviceContext_free_func
{
public IntPtr Pointer;
public static implicit operator AVHWDeviceContext_free_func(AVHWDeviceContext_free func) => new AVHWDeviceContext_free_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate void AVHWFramesContext_free(AVHWFramesContext* @ctx);
public unsafe struct AVHWFramesContext_free_func
{
public IntPtr Pointer;
public static implicit operator AVHWFramesContext_free_func(AVHWFramesContext_free func) => new AVHWFramesContext_free_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int avio_alloc_context_read_packet(void* @opaque, byte* @buf, int @buf_size);
public unsafe struct avio_alloc_context_read_packet_func
{
public IntPtr Pointer;
public static implicit operator avio_alloc_context_read_packet_func(avio_alloc_context_read_packet func) => new avio_alloc_context_read_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate long avio_alloc_context_seek(void* @opaque, long @offset, int @whence);
public unsafe struct avio_alloc_context_seek_func
{
public IntPtr Pointer;
public static implicit operator avio_alloc_context_seek_func(avio_alloc_context_seek func) => new avio_alloc_context_seek_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int avio_alloc_context_write_packet(void* @opaque, byte* @buf, int @buf_size);
public unsafe struct avio_alloc_context_write_packet_func
{
public IntPtr Pointer;
public static implicit operator avio_alloc_context_write_packet_func(avio_alloc_context_write_packet func) => new avio_alloc_context_write_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVIOContext_read_packet(void* @opaque, byte* @buf, int @buf_size);
public unsafe struct AVIOContext_read_packet_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_read_packet_func(AVIOContext_read_packet func) => new AVIOContext_read_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVIOContext_read_pause(void* @opaque, int @pause);
public unsafe struct AVIOContext_read_pause_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_read_pause_func(AVIOContext_read_pause func) => new AVIOContext_read_pause_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate long AVIOContext_read_seek(void* @opaque, int @stream_index, long @timestamp, int @flags);
public unsafe struct AVIOContext_read_seek_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_read_seek_func(AVIOContext_read_seek func) => new AVIOContext_read_seek_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate long AVIOContext_seek(void* @opaque, long @offset, int @whence);
public unsafe struct AVIOContext_seek_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_seek_func(AVIOContext_seek func) => new AVIOContext_seek_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate ulong AVIOContext_update_checksum(ulong @checksum, byte* @buf, uint @size);
public unsafe struct AVIOContext_update_checksum_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_update_checksum_func(AVIOContext_update_checksum func) => new AVIOContext_update_checksum_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVIOContext_write_data_type(void* @opaque, byte* @buf, int @buf_size, AVIODataMarkerType @type, long @time);
public unsafe struct AVIOContext_write_data_type_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_write_data_type_func(AVIOContext_write_data_type func) => new AVIOContext_write_data_type_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVIOContext_write_packet(void* @opaque, byte* @buf, int @buf_size);
public unsafe struct AVIOContext_write_packet_func
{
public IntPtr Pointer;
public static implicit operator AVIOContext_write_packet_func(AVIOContext_write_packet func) => new AVIOContext_write_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVIOInterruptCB_callback(void* @p0);
public unsafe struct AVIOInterruptCB_callback_func
{
public IntPtr Pointer;
public static implicit operator AVIOInterruptCB_callback_func(AVIOInterruptCB_callback func) => new AVIOInterruptCB_callback_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int func(AVFilterContext* @ctx, void* @arg, int @jobnr, int @nb_jobs);
public unsafe struct func_func
{
public IntPtr Pointer;
public static implicit operator func_func(func func) => new func_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6494f6467575f8f4686755f1fb403a78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c64159813b5056848bf146c573693369
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,21 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
namespace LeviathanVideo.Abstractions
{
public interface IFixedArray
{
int Length { get; }
}
internal interface IFixedArray<T> : IFixedArray
{
T this[uint index] { get; set; }
T[] ToArray();
void UpdateFrom(T[] array);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 831fd920f1934bd46a5a38037ddf74b5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
{
"name": "Leviathan.Core",
"rootNamespace": "",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f1d67e105160e074c99d37c9215900e1
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,56 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
using System;
using Unity.Collections.LowLevel.Unsafe;
namespace LeviathanVideo.Abstractions
{
public static partial class leviathan
{
#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_IOS
public static readonly int EAGAIN = 35;
public static readonly int ENOMEM = 12;
public static readonly int EINVAL = 22;
#elif UNITY_WEBGL && !UNITY_EDITOR
public static readonly int EAGAIN = 6;
public static readonly int ENOMEM = 48;
public static readonly int EINVAL = 28;
#else
public static readonly int EAGAIN = 11;
public static readonly int ENOMEM = 12;
public static readonly int EINVAL = 22;
#endif
// public static readonly int EPIPE = 32;
public static ulong UINT64_C<T>(T a)
=> Convert.ToUInt64(a);
public static int AVERROR_Enum<T1>(T1 a) where T1 : struct, IConvertible => -UnsafeUtility.EnumToInt(a);
public static int AVERROR<T1>(T1 a)
=> -Convert.ToInt32(a);
public static int MKTAG<T1, T2, T3, T4>(T1 a, T2 b, T3 c, T4 d)
=> (int)(Convert.ToUInt32(a) | (Convert.ToUInt32(b) << 8) | (Convert.ToUInt32(c) << 16) |
(Convert.ToUInt32(d) << 24));
public static int FFERRTAG<T1, T2, T3, T4>(T1 a, T2 b, T3 c, T4 d)
=> -MKTAG(a, b, c, d);
public static int AV_VERSION_INT<T1, T2, T3>(T1 a, T2 b, T3 c) =>
(Convert.ToInt32(a) << 16) | (Convert.ToInt32(b) << 8) | Convert.ToInt32(c);
public static string AV_VERSION_DOT<T1, T2, T3>(T1 a, T2 b, T3 c)
=> $"{a}.{b}.{c}";
public static string AV_VERSION<T1, T2, T3>(T1 a, T2 b, T3 c)
=> AV_VERSION_DOT(a, b, c);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ebc87a006120f7d4e8ac1faf1284562e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ac98c4f0ef273194db7db58423be559f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 25e968c51067fb54a85f6052c03f6bcc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,91 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace LeviathanVideo.Abstractions
{
public class UTF8Marshaler : ICustomMarshaler
{
private static readonly UTF8Marshaler Instance = new UTF8Marshaler();
public virtual object MarshalNativeToManaged(IntPtr pNativeData) => FromNative(Encoding.UTF8, pNativeData);
public virtual IntPtr MarshalManagedToNative(object managedObj)
{
if (managedObj == null)
return IntPtr.Zero;
if (!(managedObj is string str))
throw new MarshalDirectiveException($"{GetType().Name} must be used on a string.");
return FromManaged(Encoding.UTF8, str);
}
public virtual void CleanUpNativeData(IntPtr pNativeData)
{
//Free anything allocated by MarshalManagedToNative
//This is called after the native function call completes
if (pNativeData != IntPtr.Zero)
Marshal.FreeHGlobal(pNativeData);
}
public void CleanUpManagedData(object managedObj)
{
//Free anything allocated by MarshalNativeToManaged
//This is called after the native function call completes
}
public int GetNativeDataSize() => -1; // Not a value type
public static ICustomMarshaler GetInstance(string cookie) => Instance;
public static unsafe string FromNative(Encoding encoding, IntPtr pNativeData) => FromNative(encoding, (byte*)pNativeData);
public static unsafe string FromNative(Encoding encoding, byte* pNativeData)
{
if (pNativeData == null)
return null;
var start = pNativeData;
var walk = start;
// Find the end of the string
while (*walk != 0) walk++;
if (walk == start)
return string.Empty;
return new string((sbyte*)pNativeData, 0, (int)(walk - start), encoding);
}
public static unsafe IntPtr FromManaged(Encoding encoding, string value)
{
if (encoding == null || value == null)
return IntPtr.Zero;
var length = encoding.GetByteCount(value);
var buffer = (byte*)Marshal.AllocHGlobal(length + 1).ToPointer();
if (length > 0)
{
fixed (char* pValue = value)
{
encoding.GetBytes(pValue, value.Length, buffer, length);
}
}
buffer[length] = 0;
return new IntPtr(buffer);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d3fb0a766a91b74782afd15644bd45b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f5804ddd88f687945bf3886c41d4a565
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,402 @@
/*----------------------------------------------------------------
// Copyright (C) 2025 Beijing All rights reserved.
//
// Author: huachangmiao
// Create Date: 2025/04/11
// Module Describe:
//----------------------------------------------------------------*/
using System;
namespace LeviathanVideo.Abstractions
{
public static unsafe partial class leviathan
{
/// <summary>Clip a signed 64-bit integer value into the -2147483648,2147483647 range.</summary>
/// <param name="a">value to clip</param>
/// <returns>clipped value</returns>
public static int av_clipl_int32_c(long @a)
{
if ((((ulong)a + (2147483648UL)) & ~(4294967295UL)) != 0)
return (int)((a >> 63) ^ 2147483647);
else
return (int)a;
}
// original body hash: hVbFRW9NmALaR5Wqm8W2hfXu9xV8Kg7CEndQKK0wY4I=
/// <summary>Convert an AVRational to a `double`.</summary>
/// <param name="a">AVRational to convert</param>
/// <returns>`a` in floating-point form</returns>
public static double av_q2d(AVRational @a)
{
return a.num / (double)a.den;
}
// original body hash: j4R2BS8nF6czcUDVk5kKi9nLEdlTI/NRDYtnc1KFeyE=
#region unuse code
/*
/// <summary>Compute ceil(log2(x)).</summary>
/// <param name="x">value used to compute ceil(log2(x))</param>
/// <returns>computed ceiling of log2(x)</returns>
public static int av_ceil_log2_c(int @x)
{
return av_log2((uint)(x - 1U) << 1);
}
// original body hash: Y9QGw919/NB5ltczSPmZu5WZt+BfR1GGQ58ULgOxiNo=
/// <summary>Clip a signed integer value into the amin-amax range.</summary>
/// <param name="a">value to clip</param>
/// <param name="amin">minimum value of the clip range</param>
/// <param name="amax">maximum value of the clip range</param>
/// <returns>clipped value</returns>
public static int av_clip_c(int @a, int @amin, int @amax)
{
if (a < amin)
return amin;
else if (a > amax)
return amax;
else
return a;
}
// original body hash: FGSX8EvLhMgYqP9+0z1+Clej4HxjpENDPDX7uAYLx6k=
/// <summary>Clip a signed integer value into the -32768,32767 range.</summary>
/// <param name="a">value to clip</param>
/// <returns>clipped value</returns>
public static short av_clip_int16_c(int @a)
{
if (((a + 32768U) & ~65535) != 0)
return (short)((a >> 31) ^ 32767);
else
return (short)a;
}
// original body hash: l7ot2X+8YIG7Ze9ecaMTap87pGl9Q5kffGq1e9dS9Es=
/// <summary>Clip a signed integer value into the -128,127 range.</summary>
/// <param name="a">value to clip</param>
/// <returns>clipped value</returns>
public static sbyte av_clip_int8_c(int @a)
{
if (((a + 128U) & ~255) != 0)
return (sbyte)((a >> 31) ^ 127);
else
return (sbyte)a;
}
// original body hash: 959D6ojD8+Bo9o7pGvHcWTnCDg5Ax0o328RGYDIiUvo=
/// <summary>Clip a signed integer into the -(2^p),(2^p-1) range.</summary>
/// <param name="a">value to clip</param>
/// <param name="p">bit position to clip at</param>
/// <returns>clipped value</returns>
public static int av_clip_intp2_c(int @a, int @p)
{
if ((((uint)a + (1U << p)) & ~((2U << p) - 1)) != 0)
return (a >> 31) ^ ((1 << p) - 1);
else
return a;
}
// original body hash: H4R9TdJsLPxie0kMNORwLhiEFWSn5cG8vNmgEcRcwaE=
/// <summary>Clip a signed integer value into the 0-65535 range.</summary>
/// <param name="a">value to clip</param>
/// <returns>clipped value</returns>
public static ushort av_clip_uint16_c(int @a)
{
if ((a & (~65535)) != 0)
return (ushort)((~a) >> 31);
else
return (ushort)a;
}
// original body hash: nI5Vkw30nAjS2NmNSdCSnHeAUcY47XT0lnrnsUK/bJ4=
/// <summary>Clip a signed integer value into the 0-255 range.</summary>
/// <param name="a">value to clip</param>
/// <returns>clipped value</returns>
public static byte av_clip_uint8_c(int @a)
{
if ((a & (~255)) != 0)
return (byte)((~a) >> 31);
else
return (byte)a;
}
// original body hash: 32OGGgXBFRL7EcU8DizK9KbIFfU356+5hgUEyAOjIUY=
/// <summary>Clip a signed integer to an unsigned power of two range.</summary>
/// <param name="a">value to clip</param>
/// <param name="p">bit position to clip at</param>
/// <returns>clipped value</returns>
public static uint av_clip_uintp2_c(int @a, int @p)
{
if ((a & ~((1U << p) - 1)) != 0)
return (uint)(~a) >> 31 & ((1U << p) - 1);
else
return (uint)a;
}
// original body hash: e+b5mkBcLXfL9tlPoRVY9A8fy1jLPsqovjAobPBirRs=
/// <summary>Clip a signed 64bit integer value into the amin-amax range.</summary>
/// <param name="a">value to clip</param>
/// <param name="amin">minimum value of the clip range</param>
/// <param name="amax">maximum value of the clip range</param>
/// <returns>clipped value</returns>
public static long av_clip64_c(long @a, long @amin, long @amax)
{
if (a < amin)
return amin;
else if (a > amax)
return amax;
else
return a;
}
// original body hash: FGSX8EvLhMgYqP9+0z1+Clej4HxjpENDPDX7uAYLx6k=
/// <summary>Clip a double value into the amin-amax range. If a is nan or -inf amin will be returned. If a is +inf amax will be returned.</summary>
/// <param name="a">value to clip</param>
/// <param name="amin">minimum value of the clip range</param>
/// <param name="amax">maximum value of the clip range</param>
/// <returns>clipped value</returns>
public static double av_clipd_c(double @a, double @amin, double @amax)
{
return ((((a) > (amin) ? (a) : (amin))) > (amax) ? (amax) : (((a) > (amin) ? (a) : (amin))));
}
// original body hash: 3g76qefPWCYqXraY2vYdxoH58/EKn5EeR9v7cGEBM6Y=
/// <summary>Clip a float value into the amin-amax range. If a is nan or -inf amin will be returned. If a is +inf amax will be returned.</summary>
/// <param name="a">value to clip</param>
/// <param name="amin">minimum value of the clip range</param>
/// <param name="amax">maximum value of the clip range</param>
/// <returns>clipped value</returns>
public static float av_clipf_c(float @a, float @amin, float @amax)
{
return ((((a) > (amin) ? (a) : (amin))) > (amax) ? (amax) : (((a) > (amin) ? (a) : (amin))));
}
// original body hash: 3g76qefPWCYqXraY2vYdxoH58/EKn5EeR9v7cGEBM6Y=
/// <summary>Compare two rationals.</summary>
/// <param name="a">First rational</param>
/// <param name="b">Second rational</param>
/// <returns>One of the following values: - 0 if `a == b` - 1 if `a &gt; b` - -1 if `a &lt; b` - `INT_MIN` if one of the values is of the form `0 / 0`</returns>
public static int av_cmp_q(AVRational @a, AVRational @b)
{
long tmp = a.num * (long)b.den - b.num * (long)a.den;
if (tmp != 0)
return (int)((tmp ^ a.den ^ b.den) >> 63) | 1;
else if (b.den != 0 && a.den != 0)
return 0;
else if (a.num != 0 && b.num != 0)
return (a.num >> 31) - (b.num >> 31);
else
return (-2147483647 - 1);
}
// original body hash: M+RGb5gXGdDjfY/gK5ZeCYeYrZAxjTXZA9+XVu0I66Q=
/// <summary>Reinterpret a double as a 64-bit integer.</summary>
public static ulong av_double2int(double @f)
{
return (ulong)@f;
}
// original body hash: 2HuHK8WLchm3u+cK6H4QWhflx2JqfewtaSpj2Cwfi8M=
/// <summary>Reinterpret a float as a 32-bit integer.</summary>
public static uint av_float2int(float @f)
{
return (uint)@f;
}
// original body hash: uBvsHd8EeFnxDvSdDE1+k5Um29kCuf0aEJhAvDy0wZk=
/// <summary>Wrapper around av_frame_side_data_get_c() to workaround the limitation that for any type T the conversion from T * const * to const T * const * is not performed automatically in C.</summary>
public static AVFrameSideData* av_frame_side_data_get(AVFrameSideData** @sd, int @nb_sd, AVFrameSideDataType @type)
{
return av_frame_side_data_get_c(sd, nb_sd, type);
}
// original body hash: nxiyu/BnkvF9Z/fWwpii6qfquOeLA/wdeiuxyQQxS4E=
/// <summary>Wrapper around av_image_copy() to workaround the limitation that the conversion from uint8_t * const * to const uint8_t * const * is not performed automatically in C.</summary>
public static void av_image_copy2(ref byte_ptr4 @dst_data, in int4 @dst_linesizes, ref byte_ptr4 @src_data, in int4 @src_linesizes, AVPixelFormat @pix_fmt, int @width, int @height)
{
av_image_copy(ref dst_data, dst_linesizes, src_data, src_linesizes, pix_fmt, width, height);
}
// original body hash: RdaM2zKuF7t0cNJItdh1SZPg9WiOfPpTwty5cHDiZ2A=
/// <summary>Reinterpret a 64-bit integer as a double.</summary>
public static double av_int2double(ulong @i)
{
return (double)@i;
}
// original body hash: iFt3hVHTpF9jjqIGAAf/c7FrGfenOXGxdsyMjmrbwvw=
/// <summary>Reinterpret a 32-bit integer as a float.</summary>
public static float av_int2float(uint @i)
{
return (float)@i;
}
// original body hash: wLGFPpW+aIvxW79y6BVY1LKz/j7yc3BdiaJ7mD4oQmw=
/// <summary>Invert a rational.</summary>
/// <param name="q">value</param>
/// <returns>1 / q</returns>
public static AVRational av_inv_q(AVRational @q)
{
var r = new AVRational { @num = q.den, @den = q.num };
return r;
}
// original body hash: sXbO4D7vmayAx56EFqz9C0kakcSPSryJHdk0hr0MOFY=
/// <summary>Fill the provided buffer with a string containing an error string corresponding to the AVERROR code errnum.</summary>
/// <param name="errbuf">a buffer</param>
/// <param name="errbuf_size">size in bytes of errbuf</param>
/// <param name="errnum">error code to describe</param>
/// <returns>the buffer in input, filled with the error description</returns>
public static byte* av_make_error_string(byte* @errbuf, ulong @errbuf_size, int @errnum)
{
av_strerror(errnum, errbuf, errbuf_size);
return errbuf;
}
// original body hash: DRHQHyLQNo9pTxA+wRw4zVDrC7Md1u3JWawQX0BVkqE=
/// <summary>Create an AVRational.</summary>
public static AVRational av_make_q(int @num, int @den)
{
var r = new AVRational { @num = num, @den = den };
return r;
}
// original body hash: IAPYNNcg3GX0PGxINeLQhb41dH921lPVKcnqxCk7ERA=
[Obsolete()]
public static uint av_mod_uintp2_c(uint @a, uint @p)
{
return av_zero_extend_c(a, p);
}
// original body hash: MfDd5KRKGNiwvccdrrbME05wNKCRzGTF1T24OggAyp0=
public static int av_parity_c(uint @v)
{
return av_popcount_c(v) & 1;
}
// original body hash: Hsrq5CWkNvuNTnqES92ZJYVYpKXFwosrZNja/oaUd0s=
/// <summary>Count number of bits set to one in x</summary>
/// <param name="x">value to count bits of</param>
/// <returns>the number of bits set to one in x</returns>
public static int av_popcount_c(uint @x)
{
x -= (x >> 1) & 1431655765;
x = (x & 858993459) + ((x >> 2) & 858993459);
x = (x + (x >> 4)) & 252645135;
x += x >> 8;
return (int)((x + (x >> 16)) & 63);
}
// original body hash: 6EqV8Ll7t/MGINV9Nh3TSEbNyUYeskm7HucpU0SAkgg=
/// <summary>Count number of bits set to one in x</summary>
/// <param name="x">value to count bits of</param>
/// <returns>the number of bits set to one in x</returns>
public static int av_popcount64_c(ulong @x)
{
return av_popcount_c((uint)x) + av_popcount_c((uint)(x >> 32));
}
// original body hash: 4wjPAKU9R0yS6OI8Y9h3L6de+uXt/lBm+zX7t5Ch18k=
/// <summary>Add two signed 32-bit values with saturation.</summary>
/// <param name="a">one value</param>
/// <param name="b">another value</param>
/// <returns>sum with signed saturation</returns>
public static int av_sat_add32_c(int @a, int @b)
{
return av_clipl_int32_c((long)a + b);
}
// original body hash: GAAy4GsS2n+9kJ/8hzuONPUOGIsiOj7PvXnLHUVrimY=
/// <summary>Add two signed 64-bit values with saturation.</summary>
/// <param name="a">one value</param>
/// <param name="b">another value</param>
/// <returns>sum with signed saturation</returns>
public static long av_sat_add64_c(long @a, long @b)
{
try
{
return @a + @b;
}
catch (OverflowException)
{
return ((double)@a + (double)@b) > 0d ? long.MaxValue : long.MinValue;
}
}
// original body hash: qeup76rp1rjakhMYQJWWEYIkpgscUcDfzDIrjyqk5iM=
/// <summary>Add a doubled value to another value with saturation at both stages.</summary>
/// <param name="a">first value</param>
/// <param name="b">value doubled and added to a</param>
/// <returns>sum sat(a + sat(2*b)) with signed saturation</returns>
public static int av_sat_dadd32_c(int @a, int @b)
{
return av_sat_add32_c(a, av_sat_add32_c(b, b));
}
// original body hash: Kbha6XFULk7dxB6zc5WRwoPczQVN7HBcNs9Hjlj/Caw=
/// <summary>Subtract a doubled value from another value with saturation at both stages.</summary>
/// <param name="a">first value</param>
/// <param name="b">value doubled and subtracted from a</param>
/// <returns>difference sat(a - sat(2*b)) with signed saturation</returns>
public static int av_sat_dsub32_c(int @a, int @b)
{
return av_sat_sub32_c(a, av_sat_add32_c(b, b));
}
// original body hash: ypu4i+30n3CeMxdL8pq7XDYAFBi1N5d2mkIT6zQ1bO0=
/// <summary>Subtract two signed 32-bit values with saturation.</summary>
/// <param name="a">one value</param>
/// <param name="b">another value</param>
/// <returns>difference with signed saturation</returns>
public static int av_sat_sub32_c(int @a, int @b)
{
return av_clipl_int32_c((long)a - b);
}
// original body hash: /tgXI2zbIgliqOwZbpnq7jSiVj0N70RjBFsbkIkWhsM=
/// <summary>Subtract two signed 64-bit values with saturation.</summary>
/// <param name="a">one value</param>
/// <param name="b">another value</param>
/// <returns>difference with signed saturation</returns>
public static long av_sat_sub64_c(long @a, long @b)
{
try
{
return @a - @b;
}
catch (OverflowException)
{
return ((double)@a - (double)@b) > 0d ? long.MaxValue : long.MinValue;
}
}
// original body hash: 6YrSxDrYVG1ac1wlCiXKMhTwj7Kx6eym/YtspKusrGk=
/// <summary>Return x default pointer in case p is NULL.</summary>
public static void* av_x_if_null(void* @p, void* @x)
{
return (void*)(p != null ? p : x);
}
// original body hash: zOY924eIk3VeTSNb9XcE2Yw8aZ4/jlzQSfP06k5n0nU=
/// <summary>Clear high bits from an unsigned integer starting with specific bit position</summary>
/// <param name="a">value to clip</param>
/// <param name="p">bit position to clip at. Must be between 0 and 31.</param>
/// <returns>clipped value</returns>
public static uint av_zero_extend_c(uint @a, uint @p)
{
return a & ((1U << (int)p) - 1);
}
// original body hash: ncn4Okxr9Nas1g/qCfpRHKtywuNmJuf3UED+o3wjadc=
/// <summary>ftell() equivalent for AVIOContext.</summary>
/// <returns>position or AVERROR.</returns>
public static long avio_tell(AVIOContext* @s)
{
return avio_seek(s, 0, 1);
}
// original body hash: o18c3ypeh9EsmYaplTel2ssgM2PZKTTDfMjsqEopycw=
*/
#endregion
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c6aafe78d5c8f034e91415b317e7a463
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1156a8d8f5e1b0c4ab423518683a73c4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a9ba0e5ea12d414b922e04da0d8f224
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1798e75878e264647a9f38b7a694542c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f0472c50f0c01884c8341ae655a7a45f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
fileFormatVersion: 2
guid: d349bdd529bf1384581da0acce9d9cf3
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings:
AndroidSharedLibraryType: Executable
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
fileFormatVersion: 2
guid: da40082fb7afc814a880157ff135c348
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings:
AndroidSharedLibraryType: Executable
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
fileFormatVersion: 2
guid: 5a590fa83370f1b43aded6dd0418dfb8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings:
AndroidSharedLibraryType: Executable
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5f2c55beab072af43adbb43c9090cb33
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
fileFormatVersion: 2
guid: c5e0a9f6ab078aa4b8d1cd2e0ed2e318
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
fileFormatVersion: 2
guid: 49e15e07e8602b941b3d18e5abffaa29
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
fileFormatVersion: 2
guid: 46b4457b8ae0fe541bec45c4933cd4a9
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4f0cc0aea8eaabd4fa01decdabdb378d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
fileFormatVersion: 2
guid: 6b623314619024a4f8397da099579e7b
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings:
AndroidSharedLibraryType: Executable
CPU: X86
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
fileFormatVersion: 2
guid: b12057dc023f6204791722a99fe1e136
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 1
settings:
AndroidSharedLibraryType: Executable
CPU: X86
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More