Giter Site home page Giter Site logo

assetbundlepatch's Introduction

AssetBundlePatch

AssetBundlePatch 可以对 Unity3d 的 AssetBundle进行差异更新。

可以根据客户端安装包资源和已有的AssetBundle包,判断出重复资源,只进行差异更新。

该插件诞生过程:http://www.dpull.com/blog/hero_assetbundle/

测试工程使用方法

测试环境:编辑器:unity4.6 mac, windows;移动设备:itouch4, 小米2

iPhone

  1. 打开XStudio->Tools->One Builder插件界面
  2. 点击 Test iPhone 按钮
  3. 运行 根目录中的 Bin/iPhone 文件夹中的XCode工程
  4. 发布到手机上。

Android

  1. 打开XStudio->Tools->One Builder插件界面
  2. 点击 Test Android 按钮
  3. 使用Eclipse Import 根目录中的 Bin/Android 文件夹
  4. 发布到手机上。

做了什么

该工程共有两个场景,一个小人跑在蓝色的场景上(Level1),一个小人跑在绿色的场景上(Level2),也就是说,除了场景的材质,其他的资源都是一样的。

我们的安装包通过BuildPlayer只Build了Level1,然后通过BuildStreamedSceneAssetBundle制作了Level2的AssetBundle,这个AssetBundle有2.93MB,但其实这个AssetBundle中的大部分资源都在客户端安装包中,使用 AssetBundlePatch将其取差异,将差异压缩后大小为19.4KB,然后客户端开始运行时,通过AssetBundlePatch 将其恢复为原来2.93MB的AssetBundle,合并完成后客户端将Enter Level2的按钮,可以进入绿色背景的Level2.

依赖库

assetbundlepatch's People

Contributors

dpull avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.