There are basically two ways of doing this. Either wire your OtherGameObject with the s_ReadNeuro game object in the editor or find the s_ReadNeuro game object in the OtherGameObject using Unity's find functions. Which one to use depends on your use case, but in general I prefer wiring in the editor to using the Find functions (less code, less hassle). In any case your OtherGameObject would look something like this:
class OtherGameObject : MonoBehaviour {
public s_ReadNeuro readNeuroInstance;
void Update() {
var attention = readNeuroInstance.attention;
// do something with it.
}
}
Then in the editor, create a new game object, attach the OtherGameObject behaviour to it and then drag the instance of the GameObject having the s_ReadNeuro script on it to the "Read Neuro Instance" field in the inspector of the OtherGameObject.
If you want to use the find methods, extend the script of OtherGameObject as follows:
class OtherGameObject : MonoBehaviour {
private s_ReadNeuro readNeuroInstance;
void Start() {
readNeuroInstance = GameObject.FindObjectOfType(typeof(s_ReadNeuro));
}
void Update() {
var attention = readNeuroInstance.attention;
// do something with it.
}
}
In this case you don't need to wire the objects in the editor. Be sure to call the Find function in Start or Awake as it's not exactly a cheap function to call.