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
1
Question by rah · Feb 24, 2013 at 06:08 AM · editorarraylistarrayslists

Is there a way to remove array entries in the editor?

Not in code, but in the editor window. For example, suppose I have a frame-by-frame sprite animation, but then I want to remove a frame from the middle. Just in the editor (i.e. no scripting), how can I do that? If this is not possible, is it something that might be considered? I think there are clear applications for being able to edit an array by moving entries around, copying entries, deleting entries, etc.

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

4 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by thelackey3326 · Jun 26, 2015 at 09:14 PM

If you have an array of items in the Inspector and want to delete an entry from the middle of the array, you can select the item (click on its name, it should turn blue) and then do a Shift-Delete. The item should be gone then, and your array size will decrement.

See this link http://blog.almostlogical.com/2011/12/19/unity-editor-lesser-known-features/

Heads up, though! It says you have to do Shift-Delete twice, but that isn't actually correct.

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

Answer by malkere · May 20, 2019 at 06:05 AM

Nowadays you can right-click on them and delete them to resize the array, but shift-delete does not seem to work. Would be really nice to have a keyboard shortcut.

You can select one then hit delete to clear it and use the up and down arrow to move around and continue deleting. Then you can right-click, up arrow, and delete to clear an entry. That let me clear/cleanup a big messy array pretty fast without having to reset it.

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 Leniaal · Jun 14, 2019 at 01:31 PM 1
Share

Thanks a lot for this.

avatar image
1

Answer by robertbu · Feb 24, 2013 at 06:20 AM

You can shorten it, but you cannot remove an entry in the middle. You can write an editor script that manipulates an specific array including deleting or inserting in the middle.

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 Tarlius · Feb 24, 2013 at 06:38 AM 0
Share

Watch out if you're "referencing" them somewhere else.

For example, for animations you might store all possible frames in one array, then make another array for an animation that references the frames array. The animation array reads "1, 2, 3, 10, 3, 2, 1". Later on, you remove frame #9. Frame #10 is moved to #9. The animation would now be using the old frame #11 in place of #10 if you didn't update it.

avatar image
0

Answer by WSAGAMERS · Jun 07, 2021 at 09:38 AM

Just Right-Click on Array Item from Inspector and Select Delete Array Element.

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

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

14 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

Related Questions

Problem with arrays in a list 1 Answer

How can you do calculations on two lists? 1 Answer

Reading all data in the list with duplicate data inside 1 Answer

Undo/back system using a List/Array 2 Answers

How to modify array values? 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