Quantcast
Channel: Questions in topic: "gameobject.tag"
Viewing all articles
Browse latest Browse all 95

Assigning a GameObject as Player with a button

$
0
0
So I'm setting up a basic character creation screen and there are two models on the screen. I want to set up that when you press the button under the model, it will give it the Player tag and add the Player stats script onto it but I can't get the code to set up like I want it to. I keep getting the minor errors like unexpected symbol and stuff like that so I thought I would get another pair of eyes to look at it. #pragma strict var choice: GameObject; function Start () { choice = GameObject(/*select with button*/); choice.AddComponent("Player_Stats") as Object; }

Viewing all articles
Browse latest Browse all 95

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>