با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
هدفگیری دستگاه به شما امکان میدهد نسخههای مختلف (مثلاً وضوحها و غیره) یک دارایی را بر اساس سختافزارشان به دستگاهها تحویل دهید. برای مثال، میتوانید برای بهبود عملکرد، داراییهای با وضوح پایین را به دستگاههای رده پایینتر تحویل دهید، و برای بهبود کیفیت گرافیک، داراییهای با وضوح بالا را به دستگاههای با کیفیت بالاتر تحویل دهید - همه اینها بدون افزایش حجم کلی بازی تنها با ارائه داراییهای لازم به دستگاههای کاربران. این بر مفهوم بستههای دارایی در Play Asset Delivery استوار است. همانطور که بعدا خواهید دید، شما این قدرت را دارید که معیارهای گروه را تعریف کنید (در حال حاضر بر اساس RAM، مدل های دستگاه خاص، ویژگی های سیستم موجود، و سیستم روی تراشه).
فایل پیکربندی هدف گیری دستگاه
برای شروع با هدفیابی دستگاه، یک فایل پیکربندی هدفیابی دستگاه ایجاد کنید. دستورالعمل ها را می توان در مستندات مربوط به هدف گیری دستگاه یافت.
از هدف گذاری دستگاه برای بسته های دارایی خود استفاده کنید
هنگامی که فایل پیکربندی خود را ایجاد کردید، می توانید بسته های دارایی خود را بر اساس گروه های دستگاه تقسیم کنید.
بسته به اینکه برنامه خود را با پلاگین Android Gradle می سازید یا با پلاگین Play Unity، مراحل دقیق مورد نیاز متفاوت است. قبل از ادامه، تنظیمات ساخت خود را انتخاب کنید:
دایرکتوری های بسته دارایی موجود ایجاد شده را بردارید و پوشه های مناسب (همانطور که در زیر توضیح داده شده است) را با #group_myCustomGroup1 ، #group_myCustomGroup2 ، و غیره پس از اصلاح کنید. هنگام استفاده از بسته های دارایی در برنامه خود، نیازی به آدرس دهی پوشه ها با postfix نخواهید داشت (به عبارت دیگر، postfix به طور خودکار در طول فرآیند ساخت حذف می شود).
در این مثال، شما به asset-pack-name/assets/level/ بدون هیچ پسوندی اشاره می کنید.
دستگاههای myCustomGroup1 همه داراییها را در level#group_myCustomGroup1/ دریافت خواهند کرد، در حالی که دستگاههای myCustomGroup2 همه داراییها را در level#group_myCustomGroup2/ دریافت خواهند کرد.
دستگاههایی که به myCustomGroup1 یا myCustomGroup2 تعلق ندارند، یک بسته asset-pack-name خالی دریافت خواهند کرد.
این به این دلیل است که دستگاههایی که با هیچ گروه دستگاهی مطابقت ندارند، نوع پیشفرض بسته دارایی شما را دریافت میکنند، که شامل همه چیزهایی است که یا در داخل پوشه level#group_other یا داخل هیچ دایرکتوری با #group_suffix قرار ندارد.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Device targeting for asset delivery (beta)\n\nDevice targeting lets you deliver different versions\n(e.g. resolutions, etc.) of the same asset to devices based on their\nhardware. For example, you may choose to deliver low resolution assets\nto lower end devices to improve performance, and deliver high resolution\nassets to higher end devices to improve graphic quality - all without\nincurring any increase in overall game size by only delivering the\nnecessary assets to users' devices. This builds upon the concept of\nasset packs in Play [Asset Delivery](/guide/app-bundle/asset-delivery).\nAs you'll see later, you have the power to define the group criteria (for\nnow based on RAM, specific device models, available system features, and system on chip).\n\nDevice targeting configuration file\n-----------------------------------\n\nTo get started with device targeting, create a device targeting configuration\nfile. Instructions can be found in the [documentation for device targeting](/google/play/device-targeting).\n\nUse device targeting for your asset packs\n-----------------------------------------\n\nOnce you have created your configuration file, you can subdivide your asset\npacks by device groups.\n\nThe exact steps required are different depending on whether you are building\nyour app with the Android Gradle Plugin or with the Play Unity Plugin. Before\nproceeding, select your build setup: \nAndroid Gradle Plugin Play Unity Plugin\n\nTake the **existing** asset pack\ndirectories created and post-fix the appropriate folders\n(as described below) with `#group_myCustomGroup1`, `#group_myCustomGroup2`, etc.\nWhen using the asset packs in your app, you won't need to address folders by\npostfix (in other words, the postfix is automatically stripped during the build\nprocess).\n\nAfter the previous step, this might look like: \n\n ...\n .../asset-pack-name/src/main/assets/level#group_myCustomGroup1/\n .../asset-pack-name/src/main/assets/level#group_myCustomGroup2/\n ...\n\nIn this example, you would reference `asset-pack-name/assets/level/`\nwithout any postfixes.\n\nDevices in `myCustomGroup1` will receive all the assets under\n`level#group_myCustomGroup1/`, while devices in `myCustomGroup2` will\nreceive all the assets under `level#group_myCustomGroup2/`.\n\nDevices that don't belong to either `myCustomGroup1` or `myCustomGroup2` will\nreceive an empty `asset-pack-name` pack.\n\nThis is because devices that don't match any device group will receive the\ndefault variant of your asset pack, which includes everything that is either\ninside the `level#group_other` folder or not inside any directory with a\n`#group_suffix`.\n| **Note:** If a device matches multiple groups, it will be served the content for the group that is defined first in the XML file. The order you define groups in the XML file is your priority order.\n| **Important:** It's not possible to prevent **any** variant of your asset pack from being delivered to certain devices. Non-targeted devices will always receive the default variant."]]