Vector3 array not showing up in inspector!
Hello! This is a strange problem, which exists on my desktop, but not on my laptop. The following script requires a vector3 array to be initialised to store the set of nodes that my spaceship traverses. After many failed attempts, I realised that the array which I initialise in Start() does not show up in the inspector, and subsequently affects future assignments.
The code snippet:
public Vector3[] vPath2;
void Start ()
{
vPath2 = new Vector3[5];
//....other code
}
How it should show up:
How it is showing up:
These screenshots were taken during play mode. The laptop runs 5.0.1f1, the desktop, 5.3.1f, but I dont think that should make a difference.
I don't understand what's going. Wasted a day for this! Any help will be appreciated.
Thanks!
Where you normally declare variables, before Start(). And the variable is public.
Answer by varunvp · Jan 12, 2016 at 11:18 AM
Strangely, after many Unity restarts, it got fixed.... Really getting fed up of this!
Your answer
Follow this Question
Related Questions
Reference to Array Attribute from Inspector 0 Answers
Array items' default values won't show in inspector for classes that are not MonoBehaviour, fix? 1 Answer
Unable to initialize arrays or lists. 0 Answers
How do I fill a Sprite[] in the alphabetical order in the script Inspector? 1 Answer
2+ level Popup on InspectorGUI 1 Answer