I want the group actor is A or B or C, so I need to craete actor by some define ID instead of using prefab for my work
It like this
void OnStart()
{
if (ID == 1) actor = GameObject.Instantiate(A_Prefab);
else if (ID == 2) actor = GameObject.Instantiate(B_Prefab);
else if (ID == 3) actor = GameObject.Instantiate(C_Prefab);
}
Login
Register
By registering on this website you agree to our Privacy Policy.