I have an object that I want to react differently depending on the value of a variable from the object above and below it, in order to do this with an object I already have the ID of, I would use the SendMessage function correct? So how do I return the ID of an object above the current object?
You need to have some datastructure that knows whats above or below or something thats able to retrieve it from the world.
There is no way to just get informations about stuff at specific positions without managing all the objects so you can retrieve the objects on your own.
well I used the Raycast function to detect if an object exists at a position so is there no way of referencing that object?
if (Physics.Raycast (Vector3(transform.position.x-1.25,transform.position.y,transform.position.z), up, 2))