According to this error you don’t actually have a script called StaticObjectController. Is it spelt exactly right? You need all the capital letters to be identical.
Yes, that is the exact spelling copied over. I’m not sure how scope applies in this case, but does the gameObject hierarchy have any impact? The two gameObjects in question are on the same level, one is not the child of another.
For reference
public class playerController : MonoBehaviour {
public StaticObjectController temp;
void Start () {
…
}
…
}
and…
public class StaticObjectController : MonoBehaviour {
The error is a compiler error. That means there is a problem in the way the code itself is written. Unity hasn’t actually tried to run it yet, so the problem is not in the hierarchy.
Do you mind posting the exact code you are using, along with the error message and line number?
That was going to be one of my other suggestions if there was no problems in the code. Sometimes Unity doesn’t quite import things properly. If the code is fine, sometimes a re import can fix it.