• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ardizzle · Nov 30, 2013 at 01:18 PM · javascriptforce stop

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?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Owen-Reynolds · Nov 30, 2013 at 06:41 PM 0
Share

Are they playtesting within the Unity Editor? Not a build?

avatar image ardizzle · Nov 30, 2013 at 06:53 PM 0
Share

yea inside unity with the little play button.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ardizzle · Nov 30, 2013 at 04:56 PM 0
Share

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

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Setting Scroll View Width GUILayout 1 Answer

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Saving variables and changes to the map? 1 Answer

Best way to respawn car? 0 Answers

Execute JavaScript on iOS 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges