Help help help please #47
Replies: 11 comments 6 replies
-
Hey, So in order to help (and not having access to your code), I'd need some more info:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for reply
1.asynchronous bundle of asset ("MultiPlayer")
2.Blew this script on splash screen of game
3.yes bundle are being cached(ticked)
4.yes i download bundle on scene to scene and call
*Khepri.AssetDelivery.AddressablesAssetDelivery.GetDownloadSizeAsync("Label")
*on invokerepeating until asset are fully downloaded
Message ID: <jelte/be.khepri.play.assetdelivery.
***@***.***>
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.AddressableAssets;
using UnityEngine.SceneManagement;
using UnityEngine.AddressableAssets.ResourceLocators;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.ResourceManagement.ResourceProviders;
using Google.Play.AssetDelivery;
public class AddressableManager : MonoBehaviour
{
public static AddressableManager instance;
// Start is called before the first frame update
[SerializeField]
public AssetReference MultiPlayerEnvironment, CompaignEnivronment;
[SerializeField]
public GameObject loadingScreen, InterNetCheckPopUp;
public static bool isEnviromentload;
public AsyncOperationHandle<GameObject> CurrentMultiplayerActive, CurrentSurvivalActive, CurrentCompaignActive;
public Text loadingText;
public AsyncOperationHandle preloadOp, multiplayerLoadOp, downloadAsyncTask;
public Text connectionOk;
public AsyncOperationHandle<GameObject> summitmapAsset, nuketownAsset;
private bool checkfirstTimeLoad;
public AsyncOperationHandle<GameObject> isEnvromentDownloaded;
public Slider loadingslider;
float progess;
public enum EnvironmentType
{
compaignEnv,
survivalEnv,
multiplayerEnv
};
private void Awake()
{
if (instance == null)
{
instance = this;
}
else
if (instance != this)
{
Destroy(gameObject);
}
DontDestroyOnLoad(gameObject);
}
IEnumerator Start()
{
bool isCached = false;
var asyncTask = Khepri.AssetDelivery.AddressablesAssetDelivery.GetDownloadSizeAsync("MultiPlayer");
while (!asyncTask.IsDone) yield return null;
isCached = (asyncTask.Status == AsyncOperationStatus.Succeeded);
if (isCached)
downloadAsyncTask = Addressables.DownloadDependenciesAsync("MultiPlayer");
Addressables.DownloadDependenciesAsync("MultiPlayer");
yield return null;
}
public void InitialEnviromentCallBack(String EvnName)
{
try
{
switch (EvnName)
{
case "MULTI":
if (summitmapAsset.IsValid())
return;
summitmapAsset = MultiPlayerEnvironment.InstantiateAsync(gameObject.transform);
summitmapAsset.Completed += AfterLoadEnvironment;
break;
case "DefaultEnv":
if (nuketownAsset.IsValid())
return;
nuketownAsset = CompaignEnivronment.InstantiateAsync(gameObject.transform);
nuketownAsset.Completed += AfterLoadEnvironment;
break;
}
// loadingScreen.SetActive(true);
}
catch (Exception e)
{
Debug.Log(e);
}
}
private void AfterLoadEnvironment(AsyncOperationHandle<GameObject> obj)
{
try
{
if (obj.Status == AsyncOperationStatus.Failed)
{
Invoke("InitialEnviromentCallBack", 0.45f);
return;
}
obj = isEnvromentDownloaded;
//obj.Result.SetActive(false);
loadingScreen.SetActive(false);
}
catch (Exception e)
{
Debug.Log(e);
}
}
public void EnvironmentStatus(string Name, bool IsEnvOn)
{
try
{
switch (Name)
{
case "DefaultEnv":
if (nuketownAsset.IsValid())
Addressables.ReleaseInstance(nuketownAsset);
break;
case "MULTI":
if (summitmapAsset.IsValid())
Addressables.ReleaseInstance(summitmapAsset);
break;
}
}
catch (Exception e)
{
Debug.Log(e);
}
}
}
|
Beta Was this translation helpful? Give feedback.
-
Waiting you response please
…On Mon, Feb 14, 2022 at 6:02 PM syedarif hussain < ***@***.***> wrote:
Thank you for reply
1.asynchronous bundle of asset ("MultiPlayer")
2.Blew this script on splash screen of game
3.yes bundle are being cached(ticked)
4.yes i download bundle on scene to scene and call *Khepri.AssetDelivery.AddressablesAssetDelivery.GetDownloadSizeAsync("Label")
*on invokerepeating until asset are fully downloaded
Message ID: <jelte/be.khepri.play.assetdelivery.
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much for giving me information about it.it really helpful to
understand ANRS
but i have also some question now
1.how did i download specific bundle on specific time
2.i will use LoadfileFromBundle or LoadFileFromBundleAsync
3.how i enable framerate on mobile
…On Tue, Feb 15, 2022 at 3:15 PM Jelte Steijaert ***@***.***> wrote:
4.yes i download bundle on scene to scene and call
This shouldn't be happening, Once bundles are downloaded they are cached,
so there shouldn't be a need to download them from PAD again.
Khepri.AssetDelivery.AddressablesAssetDelivery.GetDownloadSizeAsync("MultiPlayer");
is used to know how much will be downloaded by DownloadDependenciesAsync,
The result will return the total size (in Bytes) of the pending download.
If you don't display this information there is no need to call this.
if (isCached)
downloadAsyncTask = Addressables.DownloadDependenciesAsync("MultiPlayer");
Addressables.DownloadDependenciesAsync("MultiPlayer");
You should download the dependencies always, Addressables won't be
downloading dependencies if they are already cached.
downloadAsyncTask = Addressables.DownloadDependenciesAsync("MultiPlayer");
I'm assuming on a loading screen you wait from downloadAsyncTask to be
completed?
*Khepri.AssetDelivery.AddressablesAssetDelivery.GetDownloadSizeAsync("Label")
*on invokerepeating until asset are fully downloaded
I assume you know this, but just re-iterating: an ANR is an "App Not
Responding", this means that any input (screen touches) from Android is not
being handled by the Game withing X seconds. This is usually caused by
either a synchronous operation taking to long (e.g. loading a file via
LoadFileFromBundle instead of using LoadFileFromBundleAsync), by having a
frame taking to long to process (split work across multiple frames) or by
having heavy loops (while, for, etc).
I know ANR reporting for Unity is terrible, there simple is never any lead
to point where exactly the ANR is. One thing you can do is add logging and
track the frame rate and time it takes for a frame to be processed, or
enable the framerate on you phone to see at which point drops to 0. This
may give you some clue when the ANR happens to further pin point what is
causing it.
As Addressables and PAD are using mainly Asynchronous API's there
shouldn't be an ANR triggered by this specifically.
—
Reply to this email directly, view it on GitHub
<#47 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYE6HEY7S6UMBGZA5FANPTU3IRURANCNFSM5OKPOKRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
<jelte/be.khepri.play.assetdelivery.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
thank for giving your time.your are really helpful guy.
…On Tue, Feb 15, 2022 at 8:36 PM Jelte Steijaert ***@***.***> wrote:
1.how did i download specific bundle on specific time
Best practice is to load all bundles at launch or shortly after.
2.i will use LoadfileFromBundle or LoadFileFromBundleAsync
You shouldn't need to use these with Addressables, LoadFileFromBundleAsync
is used internally by it.
3.how i enable framerate on mobile
Go to the Dev menu on your phone (each phone is different, but generally
tapping the Settings > System > About Phone > Build number 7 or 9 times to
enable this ), this will enable Developer Options under Settings >System
—
Reply to this email directly, view it on GitHub
<#47 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYE6HGORSAXFN7THUMGDHTU3JXJDANCNFSM5OKPOKRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
<jelte/be.khepri.play.assetdelivery.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
[image: image.png]
please help me how i can overcome this frozen frame and due to this our
ANRS ratio is above the 0.47%
On Fri, Feb 18, 2022 at 9:44 AM syedarif hussain <
***@***.***> wrote:
… thank for giving your time.your are really helpful guy.
On Tue, Feb 15, 2022 at 8:36 PM Jelte Steijaert ***@***.***>
wrote:
> 1.how did i download specific bundle on specific time
> Best practice is to load all bundles at launch or shortly after.
>
> 2.i will use LoadfileFromBundle or LoadFileFromBundleAsync
> You shouldn't need to use these with Addressables,
> LoadFileFromBundleAsync is used internally by it.
>
> 3.how i enable framerate on mobile
> Go to the Dev menu on your phone (each phone is different, but generally
> tapping the Settings > System > About Phone > Build number 7 or 9 times to
> enable this ), this will enable Developer Options under Settings >System
>
> —
> Reply to this email directly, view it on GitHub
> <#47 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXYE6HGORSAXFN7THUMGDHTU3JXJDANCNFSM5OKPOKRA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you authored the thread.Message ID:
> <jelte/be.khepri.play.assetdelivery.
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
waiting your response please
On Tue, Feb 22, 2022 at 3:09 PM syedarif hussain <
***@***.***> wrote:
…
On Tue, Feb 22, 2022 at 3:03 PM Jelte Steijaert ***@***.***>
wrote:
> hey, I'm not seeing the image.
>
> —
> Reply to this email directly, view it on GitHub
> <#47 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXYE6HENQMDBED6P7K54SP3U4NNQ3ANCNFSM5OKPOKRA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you authored the thread.Message ID:
> <jelte/be.khepri.play.assetdelivery.
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
[image: Capture.PNG]
…On Wed, Feb 23, 2022 at 2:06 PM Jelte Steijaert ***@***.***> wrote:
I can't see the image you have attached, can you please attach it again?
—
Reply to this email directly, view it on GitHub
<#47 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYE6HDV33OYXR3EMHS5NQTU4SPQJANCNFSM5OKPOKRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
<jelte/be.khepri.play.assetdelivery.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
waiting your response
On Thu, Feb 24, 2022 at 4:14 PM syedarif hussain <
***@***.***> wrote:
… [image: Capture.PNG]
On Wed, Feb 23, 2022 at 2:06 PM Jelte Steijaert ***@***.***>
wrote:
> I can't see the image you have attached, can you please attach it again?
>
> —
> Reply to this email directly, view it on GitHub
> <#47 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXYE6HDV33OYXR3EMHS5NQTU4SPQJANCNFSM5OKPOKRA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you authored the thread.Message ID:
> <jelte/be.khepri.play.assetdelivery.
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
ok thank you for your time
…On Thu, Feb 24, 2022 at 5:12 PM Jelte Steijaert ***@***.***> wrote:
Although this is getting completly off topic for this package, as it
doesn't seem to be directly related to it.
One thing might be that your ads are actually causing this. I downloaded
your game, and it plays smoothly, so it might be that people on slower
connections or specific ads are causing these ANRs. One thing you could do
to test this out would be to lower the amount of ads and see if you see a
drop.
Other than that, I think in the Android dashboard you can drill down the
ANRs and see what devices are causing them. It might be that one or 2
device types are causing 50 or 60% of those ANRs, so it might be a good to
just block those devices.
—
Reply to this email directly, view it on GitHub
<#47 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYE6HHCW6P3SJUIL6NL5HTU4YOCFANCNFSM5OKPOKRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
<jelte/be.khepri.play.assetdelivery.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
please I am stuck badly please help me
the issue is that I used your Play asset delivery using addressable then there are many ARNS generating due to this
The ARNS are Here ......
Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{fefa500 u0 com.lf.frontline.elite.war.free.apps/com.google.android.play.core.assetpacks.ExtractionForegroundService
Beta Was this translation helpful? Give feedback.
All reactions