So i’m creating a questions database, and i’m worried that someone will delete the entire array of questions
by changing the size of the array by accident.
So is it possible to remove this?

So i’m creating a questions database, and i’m worried that someone will delete the entire array of questions
by changing the size of the array by accident.
So is it possible to remove this?

You can write a custom editor and implement your own array drawing gui. You can also implement the ReorderableList from UnityEditorInternal with which you can implement a safety popup or anything you like when the user wants to delete something. All in all, custom editor/inspector is the way to go.
Or you can use the [HideInInspector] attribute.
That would hide the entire array…
custom editor
you appear to already be doing custom editor with the ‘add querstion’ and ‘remove empty questions’ buttons.
Just also draw the array elements manually rather than letting the default property drawer do it.
Hi Stef_Morojna,
You could use built-in arrays. They can’t be resized in the inspector. Here’s a handy link below.
https://docs.unity3d.com/ScriptReference/Array.html
Hope this helps!