I have converted the Character Customization demo offered by Unity to work on mobile. Everything works fine on Android, but unfortunately when I create asset bundles targeting iPhone, I get the following error(s) when trying to run the scene:
[mecanim]: BindSkeleton: cannot find Transform ‘eyes’
UnityEngine.Object:Instantiate(Object)
CharacterGenerator:Generate() (at Assets/Plugins/CharacterGenerator.cs:250)
CharacterCreator:Update() (at Assets/Scripts/Player/CharacterCreator.cs:46)
Each and every asset within the character throws the same BindSkeleton error. To repeat, this does NOT happen when I create the asset bundles targeting Android (or, obviously, WebPlayer or another platform).
If anyone has any idea what could be wrong, I would greatly appreciate it.
To note, I’m using the following code block in place of the default BuildAssetBundle code:
// Designate our proper build target depending on our selected platform (DEFAULT = WEBPLAYER)
BuildTarget target = BuildTarget.WebPlayer;
#if UNITY_ANDROID
target = BuildTarget.Android;
#endif
#if UNITY_IPHONE
target = BuildTarget.iPhone;
#endif
BuildPipeline.BuildAssetBundle(characterBasePrefab, null, path, BuildAssetBundleOptions.CollectDependencies, target);