
プレイヤーや管理クラスなどの一つしか作らないインスタンスを他のスクリプトにアタッチせずに取得してみました。
using UnityEngine;
public class TestManager : MonoBehaviour
{
static TestManager instance;
[SerializeField] int num;
public static TestManager GetInstance()
{
return instance;
}
private void Start()
{
instance = this;
}
public int GetNum()
{
return num;
}
}
Start()などでインスタンス自身を静的フィールドに入れて、静的メソッドで他のクラスからそれを取得できるようにしています。
インスタンスをシーンに一つ作って、適当なフィールドの値をインスペクタで変えました。

他のスクリプトからは静的メソッドを呼ぶことで、アタッチせずにシーン上のインスタンスを取得できます。

using UnityEngine;
public class AnyScript3 : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyDown(KeyCode.E))
{
TestManager test = TestManager.GetInstance();
Debug.Log($"{test.GetType()} {test.GetNum()}");
}
}
}

しかし、インスタンスが新しく作られると、返るものも変わってしまいます。
GameObject obj = new GameObject();
obj.AddComponent<TestManager>();

また、インスタンス化されてないのに参照しようとするとエラーになります。

シングルトンにすると良さそうです。参考:https://note.com/2357note/n/n581a3750c4d2