コード例 #1
0
    private void Awake()
    {
        if (instance != null && instance.GetInstanceID() != GetInstanceID())
        {
            Destroy(gameObject);
            return;
        }

        instance = this;
    }