Search Unity

Add Content post game build

Discussion in 'Addressables' started by xxxDOSxxx, Jan 14, 2019.

  1. xxxDOSxxx

    xxxDOSxxx

    Joined:
    Sep 29, 2016
    Posts:
    7
    I have project that needs to take Prefabs brom server.
    From this (
    ) I have impression that I can just add Prefab, and rebuild my asset bundles and all will work.
    But from my testing it is not working.

    I can load asset from server, but when I change assets on server, or add new ones, files that I changed, do not download in my build.
    I have read all documentation and watched all talks about new Addreseble Assets. And I still can not figure it out.

    * And I can not build for "Prepare content update"/"Build content update" because my build does not generate .bin file for some reason. And what it the point of it, if I have my game on Play Store, I do not want to update my game every time to add content.

    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.AddressableAssets;
    using UnityEngine.ResourceManagement;

    public class Load_asset : MonoBehaviour {

    public AssetLabelReference enemieName;
    public List<IResourceLocation> enemies;

    void Start () {

    Addressables.LoadAssets<IResourceLocation>(enemieName.labelString, null).Completed += EnemiesLoaded;

    }

    void EnemiesLoaded(IAsyncOperation<IList<IResourceLocation>> op) {

    enemies = new List<IResourceLocation>(op.Result);
    for (int i = 0; i < enemies.Capacity; i++)
    {
    Addressables.Instantiate<GameObject>(enemies);

    }
    }
    }
     

    Attached Files:

    Last edited: Jan 14, 2019
    MNNoxMortem likes this.
  2. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
  3. xxxDOSxxx

    xxxDOSxxx

    Joined:
    Sep 29, 2016
    Posts:
    7
    Thanks, it turns out that solution might be:
    "If you don't have shipped games, you can wipe the server before uploading new content. If you do have something shipped that will be looking for the old content, then your main current option would be to edit our build script to no longer append the hash to the bundle name."
    Or rename new files to have the same name as old ones and replace them on the server.
     
    unity_bill and MNNoxMortem like this.
  4. athanlevi825

    athanlevi825

    Joined:
    Feb 21, 2023
    Posts:
    1
    greeetings,

    thank's for information its very helpful, hopefully it will be useful for everyone who sees it.
    https://mgo303.xyz/slots