can not add to array

Add function in array joust does not exist for some reason.

error CS1061: Type `UnityEngine.GameObject[]' does not contain a definition for `Add' and no extension method `Add' of type `UnityEngine.GameObject[]' could be found. Are you missing an assembly reference?

in this case “character” is a script
and “present” is an array in that script.

adding does not work in other scripts either.

103658-capture.png

Arrays don’t have this functionality, You have to use generic lists instead

public GameObject[] present; to public List<GameObject> present;

don’t forget to add

using System.Collections.Generic;