<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhishek</title>
    <description>The latest articles on DEV Community by Abhishek (@abhiishek_28).</description>
    <link>https://dev.to/abhiishek_28</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2160603%2F28ce4812-668c-4ddf-a73f-96db1657218b.png</url>
      <title>DEV Community: Abhishek</title>
      <link>https://dev.to/abhiishek_28</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhiishek_28"/>
    <language>en</language>
    <item>
      <title>How to reduce APK size and implement progressive level downloads in Unity for an expanding game?</title>
      <dc:creator>Abhishek</dc:creator>
      <pubDate>Wed, 13 Nov 2024 13:47:24 +0000</pubDate>
      <link>https://dev.to/abhiishek_28/how-to-reduce-apk-size-and-implement-progressive-level-downloads-in-unity-for-an-expanding-game-33c6</link>
      <guid>https://dev.to/abhiishek_28/how-to-reduce-apk-size-and-implement-progressive-level-downloads-in-unity-for-an-expanding-game-33c6</guid>
      <description>&lt;p&gt;I’m developing a 3D game in Unity for Android, currently with 56 levels. Initially, with 35 levels, my APK size was about 137 MB, but after adding 21 more levels, it increased to 251 MB. We plan to scale the game up to 1,000 levels, which could result in an APK size of several gigabytes—an impractical situation for users.&lt;br&gt;
Goals:&lt;/p&gt;

&lt;p&gt;Keep the APK size below 100 MB.&lt;br&gt;
Implement progressive downloads so that players download levels as they progress.&lt;br&gt;
Ensure future levels can be added without significantly increasing the APK size or requiring large bulk downloads.&lt;br&gt;
Current Setup:&lt;/p&gt;

&lt;p&gt;Levels are loaded as prefabs in an array and included in the APK.&lt;br&gt;
No system is currently in place for remote downloads or progressive loading.&lt;br&gt;
Questions:&lt;/p&gt;

&lt;p&gt;What methods can I use to manage level content efficiently so players only download levels when needed?&lt;br&gt;
How can I implement Unity Addressables or Asset Bundles to achieve minimalistic and progressive downloads?&lt;br&gt;
What best practices should I follow for hosting and dynamically downloading assets while keeping the user experience smooth?&lt;br&gt;
Considerations:&lt;/p&gt;

&lt;p&gt;The solution should be seamless for the player, involving minimal wait times and no overwhelming download prompts.&lt;br&gt;
Ideally, the system should allow adding new levels post-release without requiring users to download the entire APK again.&lt;br&gt;
Any advice, code samples, or resources would be greatly appreciated.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to implement immediate in-app updates using Google Play API in Unity?</title>
      <dc:creator>Abhishek</dc:creator>
      <pubDate>Thu, 03 Oct 2024 07:37:16 +0000</pubDate>
      <link>https://dev.to/abhiishek_28/how-to-implement-immediate-in-app-updates-using-google-play-api-in-unity-mid</link>
      <guid>https://dev.to/abhiishek_28/how-to-implement-immediate-in-app-updates-using-google-play-api-in-unity-mid</guid>
      <description>&lt;p&gt;Hi fellow developers!&lt;/p&gt;

&lt;p&gt;I’m working on implementing &lt;strong&gt;Google Play In-App Updates&lt;/strong&gt; in my Unity project, but I’ve hit a roadblock when trying to initiate an immediate update. Despite following the official Play Core documentation, I’m encountering an error related to argument conversion when starting the update process.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Problem:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I'm getting the following error in Unity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CS1503: Argument 1: cannot convert from 'Google.Play.AppUpdate.AppUpdateType' to 'Google.Play.AppUpdate.AppUpdateOptions'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;I’m trying to implement an &lt;strong&gt;immediate in-app update&lt;/strong&gt; using the Play Core SDK in Unity without handling any priority, just like in Google’s documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Here’s What I’ve Done So Far:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Here’s my current code setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System.Collections&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;UnityEngine&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Google.Play.AppUpdate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;Google.Play.Common&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;InAppUpdateManager&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;MonoBehaviour&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;AppUpdateManager&lt;/span&gt; &lt;span class="n"&gt;appUpdateManager&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;AppUpdateManager&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;StartCoroutine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;CheckForUpdate&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="n"&gt;IEnumerator&lt;/span&gt; &lt;span class="nf"&gt;CheckForUpdate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;PlayAsyncOperation&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;AppUpdateInfo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;AppUpdateErrorCode&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;appUpdateInfoOperation&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;appUpdateManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetAppUpdateInfo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;appUpdateInfoOperation&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;appUpdateInfoOperation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IsSuccessful&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;appUpdateInfo&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;appUpdateInfoOperation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;GetResult&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

            &lt;span class="c1"&gt;// Create update options for immediate update&lt;/span&gt;
            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;appUpdateOptions&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AppUpdateOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ImmediateAppUpdateOptions&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

            &lt;span class="c1"&gt;// Attempt to start the update&lt;/span&gt;
            &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;appUpdateRequest&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;appUpdateManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartUpdate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;appUpdateInfo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;appUpdateOptions&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;appUpdateRequest&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;Debug&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;LogError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Error fetching update info: "&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;appUpdateInfoOperation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Error Details:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The specific error occurs when I try to start the update with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;appUpdateRequest&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;appUpdateManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartUpdate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;appUpdateInfo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;appUpdateOptions&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It throws the error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CS1503: Argument 1: cannot convert from 'Google.Play.AppUpdate.AppUpdateType' to 'Google.Play.AppUpdate.AppUpdateOptions'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;My Setup:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unity Version:&lt;/strong&gt; 2022.3.41f1&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Play Core SDK Version:&lt;/strong&gt; (2.1.0)&lt;/li&gt;
&lt;li&gt;I’m focusing on &lt;strong&gt;immediate updates&lt;/strong&gt; only.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;What I’ve Tried:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;I’ve ensured that I’m using the correct namespaces: &lt;code&gt;Google.Play.AppUpdate&lt;/code&gt; and &lt;code&gt;Google.Play.Common&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Verified my integration of the Play Core SDK in Unity.&lt;/li&gt;
&lt;li&gt;Tried different variations of passing options but haven’t found a working solution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Questions:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Is there something I’m missing in how &lt;strong&gt;AppUpdateOptions&lt;/strong&gt; is being set up for immediate updates?&lt;/li&gt;
&lt;li&gt;Has anyone encountered this issue with the Play Core SDK in Unity? How did you resolve it?&lt;/li&gt;
&lt;li&gt;Is there a better way to handle the immediate update flow for Google Play In-App Updates in Unity?&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Thanks in advance!&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Any help or suggestions are appreciated. I’m eager to get this working!&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>csharp</category>
      <category>android</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
