- Home /
Character Model - Selecting Submeshes via a Script
Hi, probably a stupid question but how do I select parts of a character model in a script, for example I'd like to be able to have a variable hold the Crop Top so that I can enable/disable it at runtime. I tried a public game object but from there I can't drag it into the scriptableobject I want to store it in.
Can you share more details? like the script? Fellow noob here, but I have never had a problem assigning a game object to a public variable...
Answer by Nattress · Jun 25, 2018 at 10:36 PM
For any that may find this later, I have solved the problem by Instantiating the character on start, this allows me to use the prefab's meshes.
The standalone script wont allow this. If you want to be able to assign gameobjects in the inspector in your public array, try creating an empty gameobject and add the script to the empty gameobject. You should be able to assign the GO's there.
It wasn't a $$anonymous$$onoscript script though, it was a scriptable object, so that wasn't the problem.