- Home /
In search of a component that acts as a dynamically typed, serializable list container
Firstly, what I want to do is externalize scene data as AssetBundles on iOS platform. But as the iOS AssetBundle can't include scripts which are not in core executable, and it may fail to load AssetBundles when the script differs a bit, directly attaching custom scripts in the scenes is dangerous in my case, as I don't want to re-build all old AssetBundles. So I come upon an idea that serializing 'GameObjects and some scripts' into a set of parameters and attach to a GameObject on Unity Editor, and build AssetBundles with only these parameters. So that there remains some freedom to change scripts.
TL;DR :-) ok,
So I need a Component/GameObject which has these features:
Can store almost arbitrary values.
The values types must include : String, Float, Int, Boolean, (reference of)GameObject, (reference of)Texture2D, and some others.
One GameObject/Component should carry any set of these typed values, along with each parameter's keys (names).
NO NEED TO WRITE CUSTOM SCRIPTS for each set of values. Just one or some fixed number of script(s) must be needed to carry every set of values. (So, it is NG to write a custom MonoBehavior and add a member variable each to store each values.)
The values must able to be serialized/deserialized as a scene, and can be stored as AssetBundle.
Each keys/types/values can be manipulated via inspector view
The values can be set/get from script using key name.
And I found one solution: GameFlow's "Parameters" component. It actually meets the above requirements. But the GameFlow asset is a bit overkill for the purpose and there's currently a showstopper bug which occurs on copying components or GameObjects (hopefully be fixed in v1.0 but no ETA yet).
But I want to know if there's other solutions than GameFlow's.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
AssetBundle, problem whit the version 0 Answers
How to build only specified assets into assetbundle in unity 0 Answers