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 d112570 · Oct 24, 2013 at 04:15 PM · monodeveloppaste

After Paste, how do you realign script?

After pasting codes, how do you realign the scripts, I keep having to go and press return, move up delete empty space, next line press return, move up, and delete empty space, unless I feel comfortable and I can just use the backspace key to align. It is easier to read if its properly aligned. Using Unity's MonoDevelop. I like to select all and there should be some command that says realign or something.

Comment
Add comment · Show 1
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 vexe · Oct 24, 2013 at 04:18 PM 0
Share

you mean auto-formatting the whole script? How about Edit | Format | Format Document?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Huacanacha · Oct 29, 2013 at 06:14 PM

In MonoDevelop there is a menu option (you can also add a key binding in the preferences):

Edit->Format->Format document

Unfortunately this will also change things like line spacing, where the opening parenthesis goes etc. But it will indent all of your code correctly.

Another option could be to copy the text to another editor, format, then copy back.

Comment
Add comment · Show 2 · 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 d112570 · Oct 29, 2013 at 06:48 PM 0
Share

Thx, it works, but format selection does not work. I highlighted what I selected and then selected the format selection command and it did nothing.

avatar image Huacanacha · Oct 29, 2013 at 06:59 PM 0
Share

You're right, "Format selection" doesn't do anything for me either. Huh.

There will be a new version of $$anonymous$$onoDevelop released with Unity 4.3, so hopefully this will be fixed then.

avatar image
0

Answer by IT_Criminal · Oct 24, 2013 at 04:41 PM

Select code that needs to be aligned, then press tab to indent to the right and shift+tab to indent to the left.

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 d112570 · Oct 29, 2013 at 05:54 PM 0
Share

That still does not tell me where the correct indent position is, I already knew about the tab. I still have to press return first to make sure this is the correct position before I can tab the others and start over to check the others. I use this method to check for errors incase I did a type or forgot to add something, shift indent does not help with the indent errors.

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

17 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

Related Questions

Unity ignoring script modifications (and scenes mod) (uses old version source) 0 Answers

Cant Add Script (or create any new scripts) Javascript 2 Answers

Scripts recompiling when switching from monodevelop to editor 1 Answer

Can't open scripts with monodevelop? 1 Answer

How do I place a script into an object? 1 Answer


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