Search Unity

Feature request : Asset encpryption (bump)

Discussion in 'Addressables' started by Kichang-Kim, Aug 6, 2018.

Thread Status:
Not open for further replies.
  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    Hi, I have some requests about Addressable, which is discussed in other Forum (https://forum.unity.com/threads/addressables-feature-request-basic-encryption.532604/#post-3509898) before Addressable Forum was created.

    Of course, Addressable provide customization for all of its core via interface, but it requres re-writing whole class even you need tiny additional feature only.

    It is best that Addressable provides some virtual funtions like these:

    byte[] virtual OnCatalogEncrypted(byte[] source)
    byte[] virtual OnCatalogDecrypted(byte[] source)
    byte[] virtual OnAssetBundleEncrypted(byte[] source)
    byte[] virtual OnAssetBundleDecryped(byte[] source)

    Also user can change the setting of each groups and catalog for use or not use encryption.

    I think if this features are added to Addressable, most of usecases can be covered.

    Thanks.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Hi, thanks for reaching out with this suggestion. We are in the process of changing the way group processors function and are customized. This should make it much easier for users to add encryption. This change won't be out for a while, but I'm adding a note to make sure we provide a clear encryption point.
    Thanks,
    Bill
     
    5argon, rz_0lento and Kichang-Kim like this.
  3. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Is there any example on how to do the encryption right now, with the systems place in current addressables package?
    Or simply just some info on where to hook the changes?

    I tried searching around and I mostly see people asking how to do the thing but no actual replies to those.
     
  4. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    I didn't actually try this but I imagine it would go like :

    1. In build script you would see a list of IBuildTask being assembled.

    WriteSerializedFiles() and ArchiveAndCompressBundles() has its own file you could look. After ArchiveAndCompressBundles() the bundles should be ready in the temp build folder, before being copied to your game's StreamingAssets folder.

    You could try addding a new IBuildTask around here before it is copied.

    2. You need a new variation of AssetBundleProvider that understand your encryption. Then in your group's provider drop down select your new provider.
     
    sajkowart and rz_0lento like this.
Thread Status:
Not open for further replies.