- Home /
How to change Mesh Renderer to Skinned Mesh Renderer with Script?
So I have button and I need to write function that changes current Mesh Renderer to Skinned Mesh Renderer with script. Is that possible? Is there way to just change it and apply root bone to it?
I dont know, you have to consult the scripting API. However, I know that is possible to assign bones and weights to a Skinned$$anonymous$$eshRenderer.
Why don't you simply use a "fixed" animation with a statue pose ? Or you could have the 2 components (skinned mesh renderer and mesh renderer) on your gameobject and switch them with the "activate/de-activate" checkbox when you need it.
Okay, problem is that I import models in obj format to scene and try to get animations to work. I tried to add manually skinned mesh renderer and etc, but it won't move..
does obj format not support bones/weights.... :(?
obj mesh format does not support animations, only static meshes. Below is the specification. http://paulbourke.net/dataformats/obj/
Is there any way to get model moving using obj format? Does Obj format have vertex groups is that any help?
@RamiT How do you mean? Unity already supports FBX files. You can import them in the editor and then instantiate them in runtime as GameObject's.
I mean I need to import model from outside of project folders I mean if I want to add some custom content to game after I have build exe. Too bad that obj format didn't work with animations have to think all again.
sorry for bad explaining. :)
Either use Asset Bundles http://docs.unity3d.com/ScriptReference/AssetBundle.html or you have to code your own FBX importer using the FBX SD$$anonymous$$ http://www.autodesk.com/products/fbx/overview
Your answer
Follow this Question
Related Questions
skinned mesh renderer, combine meshes can't see the result, what am I doing wrong/ missing? 0 Answers
Is it possible to make vertices defined by a mesh and mesh filters animating? 0 Answers
combining meshes 0 Answers
How can I swap character body parts at runtime? 0 Answers
does it matter that a skin mesh render is 10 times larger than the model? 1 Answer