Condor Plus
Fast Iterate
$100.00
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
08/15(2018) |
100.0 |
11/19(2024) |
100.0 |
Jump AssetStore
Condor Plus - Unity asset manage library by using assetbundle.
☄️HIGHLIGHTS☄️
Manage asset load and unload
Update bundle online
Snapshot to report asset leak problem
100% source code included
Core code is covered by unit test. You could change code to customize it with more confidence
☄️ Website: Learn more about Condor Plus
☄️ Support: Submit any questions
☄️FEATURE☄️
Use reference count to solve memory leak problem(Use AssetBundle.Unload(true) to unload asset deterministic)
Use AssetBundle reference count to solve AssetBundle dependencies problem(make sure all dependencies are loaded in correct sequence)
Use non-blocking call to solve hiccup problem(remove all hiccups which could avoid, mitigate load in main thread)
Use state matchine to solve cache problem(make asset stay in memory for seconds when reference count is 0)
Use weak reference to solve memory leak caused by library self(stop GC to recollect memory)
Automatic manage asset bundle dependencies, you could split asset bundle arbitrarily
Scene load in Editor helper script, help load scene in simulate mode
☄️INTRODUCTION☄️
Supported platforms
iOS
Android
Windows Editor
macOS Editor
Build
Check cyclic reference
- Report cyclic reference path to solve it easily
Check AssetBundleName confliction
- Check if AssetBundleName is same with directory part of other AssetBundleName
Check CRC
- Prevent Unity from using old AssetBundle by not calculate hash correctly
- Happened several times in real project
- AssetBundle is outdated and couldn't load now
- Support delete asset bundle which didn't pass crc check and retry build all assetbundles with 5 times
Clean useless directories and files automatically
- Clean before build
- Clean before copy built assetbundles to StreamingAssets directory
AssetBundle copy to StreamingAssets
- Only copy files which is updated
Cache MD5 caculation
- cache file size, last modify time, AssetBundle CRC
- Recalculate MD5 by checking cache validity to speed build
Automatic manage asset bundle dependencies, you could split asset bundle arbitrarily
Update
Automatic download changed bundles
Automatic retry after download error, retry count is customizable
Persist consistent directory structure with update target
Download speed limit
Downloaded and total bytes progress
Download thread pool with custom number
Load
Non-blocking api to load asset and scene
Use reference count to manage asset and assetbundle
Reference is saved by weak reference, don't impede GC
Reference saved detailed information
- Type, fullname including namespace
- Path, if object is GameObject or Component
- Callback, fullname including namespace
- Count
AssetBundle dependencies automatic management
AssetBundle load crc check
Cache AssetBundle in StreamingAssets directory
File in Android APK load support
Cache asset when reference count is 0
Load queue to load asset from AssetBundle, default capacity is 5
Finite state machine manage lifecycle
Debug
UI
Assets
- AssetPath
- Client fullname
- Callback fullname
- Reference count
- State
Bundles
- Bundle
- Reference count
- State
Automatic adapte screen
Snapshot
- Automatic compare two snapshot and warning if there is difference
Editor Support
Load assets and scenes without building assetbundles
Check if assetbundlename is set for correspond asset
Stop all threads after exit play mode to keep consistent
Shader reset tools
- Shader would be missing if load assetbundle which built for non-editor platform
- Should reset shader to editor version manually after load asset
Editor scene load helper
- Load scene automatically in simulate mode
Helper
Preload manager support load file from zip and apk
Preload manager use custom thread pool to do IO operation
Compression format
LZ4
- Use chunk-based algorithm to get balance on speed and size
Engineer
Unit test
- Core code covered
Code clean and simple
Separate module reasonably
Use less code in module, about 100 loc per file
No explicit thread synchronization to avoid bugs
Third party libraries
Editor
- YamlDotNet
- - Cache calculated MD5
- NSubstitute
- - Unit test helper
Runtime
- ZipStorer
- - Support decompress files on Android
Would not support
variant support
- It violates design purpose, which could use path to determine asset
blocking load
- It could cause potential hiccups in main thread
☄️USAGE☄️
Run Tools > Condor > Setup to initilize, and create two config files
1 Runtime config, Assets/Resources/Condor/Config.asset
2 Editor scene config, Assets/Editor/Condor/SceneConfig.asset, we need save scenes manualy to this config to support load scenes in Editor simulate mode
Create or find your asset and set AssetBundleName for it.
Write code to initialize Condor.
Write code to load and unload your asset by using full asset path(starting with Assets).
Then you could test load asset when enable Editor Simulation in config.
Run Tools > Condor > BuildAssetBundles could build AssetBundles and copy to StreamingAssets directory.
Then you could load asset from assetbundles.
Build to iOS/Android platform and you could load asset from assetbundles packaged in ipa/apk.
Update feature
1. Come to your project root and start `python -m SimpleHTTPServer` in command line.
2. Remove all files in `StreamingAssets/BundlesPackaged`
3. Switch on `Speed Limit` and set `Max download rate` in `Resources/Condor/Config.asset`
4. Open `Assets/Plugins/Condor/Examples/Scenes/Update.unity` and start play
☄️PRECAUTION☄️
Unit test support is include in Unity 5.6.0f3 and above, which packaged NUnit 3.5.0.0 and previous ones package NUnit 2.6.4.0
HttpWebRequest Android IL2CPP support is started from Unity 5.4.2f2
Editor simulate load Bundle information is supported in Unity 5.5.0f3 and above
Editor simulate load scenes support load by path in Unity 5.5.0f3 and above, only support load by name in previous versions
☄️API INTERFACE☄️
Initialize and destroy
Condor.Manager.Init()
Condor.Manager.Destroy()
Load and Unload
Condor.Manager.LoadAsync()
Condor.Manager.UnloadAsync()
Clean cache
Condor.Manager.UnloadUnusedImmediately()
Snapshot
Condor.Manager.BeginSnapshot()
Condor.Manager.EndSnapshot()
☄️EXAMPLES☄️
Update
Condor/Examples/Scenes/Update.unity
Asset load
Condor/Examples/Scenes/Asset.unity
Scene load
Condor/Examples/Scenes/Scene.unity
Snapshot
Condor/Tests/IntegrationTests/Scenes/SnapshotIntegrationTests.unity
☄️THIRD PARTY LIBRARIES☄️
Use YamlDotNet to deserialize AssetBundleManifest and caculate MD5.
YamlDotNet for Unity - Asset Store
https://www.assetstore.unity3d.com/en/#!/content/36292 - 4.1.0 (Feb 01, 2017)
MIT-LICENSE
Editor/Libraries/YamlDotNet/YamlDotNet.license.txt
Use NSubstitute to fake object for unit test.
NSubstitute: A friendly substitute for .NET mocking libraries
http://nsubstitute.github.io/ - 2.0.3 (Apr 25, 2017)
BSD-3-Clause
Editor/Libraries/NSubstitute/LICENSE.txt
Use ZipStorer to decompress files from zip or apk.
jaime-olivares/zipstorer: A Pure C# Class to Store Files in Zip
https://github.com/jaime-olivares/zipstorer - 3.4.0 (August 4, 2017)
MIT-LICENSE
https://github.com/jaime-olivares/zipstorer/blob/master/LICENSE.md