- Home /
Can I script to kick user out of unity playtest via scripting
I am places some error lines in mine code and I want them to either disable being able to start play testing if true or kick the player out of play testing after they start. I found Debug.Break(); but that only pauses the play test. Is this possible?
Are they playtesting within the Unity Editor? Not a build?
Answer by Owen-Reynolds · Nov 30, 2013 at 04:34 PM
I imagine Destroy(player.gameObject);
would do the trick. Or Application.LoadLevel(emptySceneName);
If it's something they can do in game to cause it, could add: PlayerPrefs.SetInt("madAtYou",1);
, and then test for it at game start?
But why would you want to offend your playtesters?
It would be like if you have an error in normal unity then it doesn't let you play test. Thats the same thing Im looking for with my script.
Your answer
Follow this Question
Related Questions
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Assets/Standard Assets (Mobile)/Example/ExampleScript.js/(13,104): BCE0044: expecting :, found ';'. 0 Answers
CSharp script can't find th jv CharacterMotor !! 1 Answer
Another camera drag script, can anyone figure out these errors? 1 Answer