Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 dalininum · Dec 05, 2011 at 10:51 PM · fileplaystopbatch

Stop play procedure from within a script

Hi,

i have two questions: 1. is it possible to stop the "play" procedure which you can initiate within the unity GUI from a script attached to an gameobject? 2. where can i find a command line (windows 7) reference which i will need for generating a batch file?

basically i would like to generate a set of 6000 screenshots which will be used to create a video in virtualdub.

look forward for any help, dalininum

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Dec 05, 2011 at 11:42 PM

Why not just take the screenshots in Unity? Just write a little editor script.

Have you tried Application.CaptureScreenshot?

If you want more control over the procedure or to use it in a webbuild you can do it manually like in this example of WWWForm.

However if you really want to do it with a batch file here is the command line reference for the Unity editor (google -->"unity command line"--> first result).

To control the editor features (like play, pause,...) take a look at EditorApplication

Comment
Add comment · Show 3 · 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 dalininum · Dec 06, 2011 at 01:00 AM 0
Share

Thanks a lot for the answer!

i have already a script to capture the screenshots, it works perfectly fine. i also have the folders in which the png files will be transferred to. from there, virtualdub will do the rest ... of course i also know about the command line reference you mention, but for my purposes i need also the commands for procedures like "open java scipt XY", "copy data from txt file", "paste it to the javascript xy" and "save the javascript XY", so i'm not satisfied with the small amount of options the command line reference you mentioned offers. is stuff like that more bound to some unity independent manipulations more depending on windows line commands themselves?

the EditorApplication part works just fine, thx!

avatar image Bunny83 · Dec 06, 2011 at 01:32 AM 0
Share

ehmm, that's not what Unity is meant for. It's not your opperating system. You can do all this in a script in Unity, but not as commandline parameters.

If you have a batch file just use the os commands (most exists since DOS).

 $$anonymous$$
 COPY
 ...

Just open C$$anonymous$$D (press windows$$anonymous$$ey + R, type "C$$anonymous$$D" and press enter) and type "HELP". That should be enough information to get this done.

avatar image Bunny83 · Dec 06, 2011 at 01:34 AM 0
Share

oh and btw: Don't post comments as answers. Answers should exclusively used for answering the question. Use "add new comment" below the post you want to comment on.

ps. I've converted your answer into a comment.

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

In game pause menu 2 Answers

Spawn object problem 1 Answer

Show Files/Folders in a Folder When typing in a text field 0 Answers

how to stop a script for a while? 3 Answers

Stopping a bit of script once it reaches certain number. 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges