Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Enter play mode from scripting?

Discussion in 'Scripting' started by Samantha, Aug 2, 2006.

  1. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    I'm attempting to creat my first editor script, but looking through the documentation, I didn't see a way to start play mode. Is this even possible?
     
  2. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Nope, not in the public API right now.

    Want to describe what you're up to?

    Cheers,
    -Jon
     
  3. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    I was inspired by the TransformSaver script, and I want to use a similar method to capture and store camera information to create a flowing, cinematic camera.
     
  4. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    I know I dont know much but is there a reason why you cannot "destroy" a main camera and "instantiate" one the next frame?(possibly with different scripts attatched?
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,400
    Speaking of scripting the play button, it would be nice if there was a keyboard command for that, plus the pause button. It does get slightly tiresome having to hit them with the mouse pointer every time. Quickly making changes in the Inspector while playing and pausing with keyboard commands would speed things some. But maybe that's just me. A really minor complaint to be sure, but I thought I'd make it anyway. :)

    --Eric
     
  6. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    From the Edit menu:
     

    Attached Files:

  7. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Wouldn't you want to use a regular old Animation for that?

    -Jon
     
  8. cupsster

    cupsster

    Joined:
    Apr 14, 2009
    Posts:
    363
    Code (csharp):
    1. EditorApplication.ExecuteMenuItem("Edit/Play");
     
  9. Frostbite23

    Frostbite23

    Joined:
    Mar 8, 2013
    Posts:
    458
    Holy Moly. this post was like made 7 years Ago?????? was unity even made at the time?