Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by zeman97 · Jan 20, 2017 at 09:47 PM · editorinspectorarraysnot workingconstant

Cannot Set Array Size in Inspector

Just as the name implies, I cannot set any array size in the inspector. I first noticed this happen in a project for the Unity Asset Store I was working on. I thought it was my custom class causing problems, but even simple classes and data types aren't working.

This is my test code: public class ArrayTest : MonoBehaviour { public int[] MyIntArray; } It's a simple script I made to try and remove any interaction with other scripts. Testing in an empty project (except for this one script). Tried resetting script. Tried re importing assets.

Running in Unity 5.0 and in Unity 5.1 Arrays worked for both versions previously.

Please help, Thanks

Comment
Add comment · Show 4
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 zeman97 · Jan 20, 2017 at 09:49 PM 0
Share

Sorry code got messed up, should read:

 public class ArrayTest : $$anonymous$$onoBehaviour {
     public int[] $$anonymous$$yIntArray;
 }
avatar image Adam-Mechtley · Jan 20, 2017 at 09:56 PM 0
Share

Does your script have a custom editor, or is this just the default inspector?

avatar image zeman97 Adam-Mechtley · Jan 20, 2017 at 10:01 PM 0
Share

$$anonymous$$y original script that I noticed the problem on had a custom inspector, but everything else, including my basic test script is using default inspector. Also the problem is affected all 3 projects I've tried across 2 Unity versions.

avatar image Adam-Mechtley zeman97 · Jan 20, 2017 at 11:54 PM 0
Share

It sounds like a bug. If you can't reproduce it in a more recent version of Unity (I can't locally) then I'd suggest at least checking to see if some patch release in your cycle fixed it, if you can't just upgrade to something altogether more recent (e.g., 5.3+). Unfortunately 5.0 and 5.1 are not likely to see any bug fixes any time soon.

2 Replies

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

Answer by zeman97 · Jan 21, 2017 at 02:15 AM

OH MY GOD I FIXED IT I'M SO EMBARRASSED

The issue was that my numlock had been turned off (I use numpad for inputing numbers exclusively). I tried with the normal number keys and then turned num lock back on and it all works.

Huge thanks to everyone who tried to help out, can't believe it was something so simple XD

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
0

Answer by AurimasBlazulionis · Jan 20, 2017 at 10:34 PM

Project settings might have messed up. Create a new project and transfer all the assets there. See if there is the same problem. Maybe you have an editor script which handles all components?

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 zeman97 · Jan 20, 2017 at 10:54 PM 0
Share

I created a new project and tried my test code (one simple array) and it still does not work.

I don't have any editor scripts that handle all components and in the empty project the only code present is the test code I provided.

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

103 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 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 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 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 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 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

How to save a two-dimensional array, as part of the variable inspector? 0 Answers

Custom Inspector changes not updating target in Edit Mode 1 Answer

Custom Editor List with child classes 1 Answer

[Editor]Get FieldInfo by using an instance of that field 1 Answer

Is there a way to live-update script-controlled UI formatting in the editor? 0 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