I get a warning Assets/meshPartsManager.js(20,18): BCW0028: WARNING: Implicit downcast from 'UnityEngine.Component' to 'UnityEngine.SkinnedMeshRenderer'. for this line : for (var SkinnedRenderer : SkinnedMeshRenderer in BonedObjects) I'm not sure how to explicitly downcast.
You can use the generic version of GetComponentsInChildren, namely Code (csharp): GetComponentsInChildren.<SkinnedMeshRenderer>(); which returns a SkinnedMeshRenderer array instead of a Component array. By the way, please use code tags for posting code instead of quote tags. Also, you'll find coding to be more consistent and understandable if you follow the convention of using lowercase for variable names. Leave uppercase for functions and classes. --Eric
Thank you very much. Yeah I thought those were the code tags, oopsie. And that isn't my code, I found it on the forums to stitch together different parts of a model (head, chest, etc.) things like that for procedurally generated models. I was going to clean it up later because it also uses old functions like SetActiveRecursively which is obsolete now apparently, so I was going to fix it all when everything worked properly (I had weird bugs), and I couldn't figure out how to typecast explicitly to remove these warnings. But everything works fine now and I shall clean up the naming conventions (trust me it looks bad to me too), thanks :grin: