Sorry for another newbie topic, but I searched all over google, and on the forums, and in the tutorials, but I can’t get this work. I’m totally newbie in Unity, now made a menu, and my game’s login screen with login etc. Working on the character select screen. I made a Goblin, and cut it to 8 pieces.
I want to render that pieces on a given position with script. Pieces can change, if the caracter wear another clotes.
Someone can say me how to make a script what render meshes on my screen, and how can I add child meshes to that mesh Like a main mesh called Goblin, and add child meshes under it like foot, arm etc…
I saw a cloning stuff on youtube, but I don’t want to cloning, so that not work for me.
Hmm I tired it, but have only the free license. I’ll try out the 30day trial then just to see this.
Edit:
Okey, I found a way to load meshes as UnityEngine.Object, and a way to merge them together, but I can’t convert UnityEngine.Object to Mesh. :S
Here is my code:
UnityEngine.Object test1= Instantiate(Resources.Load("Characters/Goblin/LArm/GLArm001")) as UnityEngine.Object;//, new Vector3(194,0,145), new Quaternion()) as Mesh;
UnityEngine.Object test2= Instantiate(Resources.Load("Characters/Goblin/Body/GBody001")) as UnityEngine.Object;//, new Vector3(194,0,145), new Quaternion()) as Mesh;
Instantiate(test1, new Vector3(194,0,145), new Quaternion());
CombineInstance[] comb = new CombineInstance[2];
comb[0].mesh = test1 as Mesh;
comb[1].mesh = test2 as Mesh;
Mesh testmesh = new Mesh();
testmesh.CombineMeshes(comb);
Mesh finalmesh = Instantiate(testmesh, new Vector3(194,0,145), new Quaternion()) as Mesh;
It’s a (little?:O) dirty, but that’s all waht I found. :S I don’t really get the way to use characterdemo stuff. :S