با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در این صفحه نحوه اجرای برنامه مانیتورینگ توضیح داده شده است. این برنامه مانیتورینگ به عنوان یک سرور محلی عمل می کند و داده هایی را که یک برنامه با قابلیت Tuning Fork تولید می کند را نمایش می دهد. شما برنامه مانیتورینگ را در کنار برنامه خود اجرا می کنید تا مطمئن شوید که داده ها را به درستی ارسال می کند.
یک نقطه پایانی محلی را در Unity فعال کنید
باید برنامه خود را طوری پیکربندی کنید که دادهها را به نقطه پایانی محلی دستگاه منتقل کند و نه سرورهای Google Play. برای فعال کردن نقطه پایانی محلی، قبل از فراخوانی Start() در کد بازی خود EnableLocalEndpoint() را فراخوانی کنید:
tuner.EnableLocalEndpoint();
یک پرچم در فایل AndroidManifest.xml خود اضافه کنید:
تنظیمات ساخت Unity را باز کنید ( File > Build Settings ).
اگر هنوز انتخاب نشده است، پلتفرم اندروید را انتخاب کنید.
کادر صادرات پروژه را انتخاب کنید. دفعه بعد که پروژه یونیتی را ساختید، یک پروژه اندروید ایجاد می کند.
یک پروژه اندروید بسازید ( File > Build and Run ).
فایل AndroidManifest.xml را باز کنید و پرچم android:usesCleartextTraffic="true" را اضافه کنید:
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[],[],null,["This page describes how to run a monitoring app. This monitoring app acts as a\nlocal server and displays the data that a Tuning Fork-enabled app\nproduces. You run the monitoring app alongside your own app to verify that it is\nproperly sending data.\n\nEnable a local endpoint in Unity\n\nYou need to configure your app to transmit data to a local endpoint on the\ndevice rather than Google Play servers. To enable a local endpoint, call\n[`EnableLocalEndpoint()`](/games/sdk/reference/performance-tuner/unity/class/google/android/performance-tuner/android-performance-tuner-t-fidelity-t-annotation-#enablelocalendpoint)\nbefore calling `Start()` in your game code: \n\n tuner.EnableLocalEndpoint();\n\nAdd a flag in your `AndroidManifest.xml` file:\n\n1. Open the Unity build settings (**File \\\u003e Build Settings**).\n2. If it's not selected yet, select the Android platform.\n3. Select the **Export Project** checkbox. The next time you build the Unity project, it creates an Android project.\n4. Build an Android project (**File \\\u003e Build and Run**).\n5. Open the `AndroidManifest.xml` file and add the flag `android:usesCleartextTraffic=\"true\"`:\n\n \u003capplication\n android:allowBackup=\"true\"\n android:icon=\"@mipmap/ic_launcher\"\n ...\n android:usesCleartextTraffic=\"true\"\n ...\n\nNow your game sends all requests to a local endpoint.\n\nRun your app and the monitor app\n\nFollow these steps to run the Tuning Fork Monitor app and your app at the same time\nto verify that your app is working properly:\n\n1. Connect a device (or [create a virtual device](/studio/run/managing-avds)) to run the apps. Enable [developer options and USB debugging](/studio/debug/dev-options#enable) on the device.\n2. Install the Tuning Fork Monitor app APK on the target device. You can build it from the [Tuning Fork Monitor source page](https://android.googlesource.com/platform/frameworks/opt/gamesdk/+/refs/heads/gamesdk-main/games-performance-tuner/tools/TuningForkMonitor/).\n3. Press the Android Home button to send the Tuning Fork Monitor app to the background on the device.\n4. Run your app in the foreground for about 30 seconds.\n5. Switch back to the Tuning Fork Monitor app.\n6. Your app's package name appears under **Live Applications**. Tap this entry to see app details and live telemetry.\n\n**Figure 1.** The monitor app detects the demo app \n**Figure 2.** The monitor app displays data from the demo app"]]