- Home /
importing customized player
I created a customizable lobby which works well the parts or being added when i check the buttons, but i cant seem to get the customized robot in the game when i play, can any one help me?
Thanks!
Sorry For the trouble!!!
It is a game, so far it is working.. IT has a game lobby, (you could test connection, customize robot, or create game)
Customize robot: takes you to another lobby where you starts of with a skeleton of the robot Prefab. here you may ad parts to your robot prefab which, is also the same player prefab when serve starts,
How can i save the the Robot Prefab that i customized so that i can use it as my player Robot Prefab when server starts?
Answer by Fyah · Jun 19, 2011 at 07:02 PM
@Marnix: I am making a robot multi player. you can customize your robot parts. next i need to know how to get the customized robot to work in game.
I hope that you understand my problem better now, i could use some help.
@Fyah: Please don't put extra information here as an answer. Ins$$anonymous$$d: try updating your question. There is an edit
button that you can use. If you have specific comments to one person, use the comment
button at the bottom right of your question.
Answer by Marnix · Jun 19, 2011 at 08:17 PM
It is very good possible to load prefabs and models at runtime. Please have a look at this post: http://answers.unity3d.com/questions/7653/dynamic-asset-loading.html
It will tell you more about dynamic asset loading
which are the keywords you'll have to look for. If it is just a robot prefab, it is easy to load it, but you need to use the special Resources
folder.
You can use the `WWW-class` and you can use the `Resources-class`. I can't tell you how it's done in one sentence, but as I instantiate a prefab, it looks as follows:
GameObject robotPrefab = (GameObject)Resources.Load("RobotPrefab");
GameObject robot = (GameObject)GameObject.Instantiate(robotPrefab);
@$$anonymous$$arnix Thank you very much i will take a look at that right now,
@Fyah: If my answer is satisfying, please press the checkbox next to it for acceptance.