grabbing references to neighboring objects on a grid.

SETUP: a gridlayout of many gameobjects (GO’s) which only have an Image component and a script which keeps track of which variable state they are in(1-4), and changes their state based on the state of surrounding GO’s. (so think dead, alive, dead if too many dead around it)

Desire: To create a set reference of each “neighboring” object on the gridlayout. None of the objects move on the layout, so once a reference is set I’m all good. And from there when the objects need to check what is around them, I can just check the reference

Problem: I have no idea how to set a reference in this fashion. I would think just using the Vector3Int based on the parent’s GridLayout, but I dont know how to properly write
" gameobject above = this. vector3int +(0,1,0)"

any help translating this to code would be great, or advise on a better way to do this

your best and easiest way would be in the code where you create/initialize your grid objects, add the refences there, as you would still have them. So if you go Grid(1,1) = someValue, you can add Grid(1,1).Left = Grid(0,1)