Spawning GameObject in Awake() spawns two GameObjects (duplicated)

What ever I spawn an object in Awake() it gets spawned twice.
This is the script:

using UnityEngine;
using System.Collections;

public class SpawnPoint : MonoBehaviour {
    public GameObject PlayerPrefab;
    // Use this for initialization
    void Awake() {
        SpawnPlayer();
    }
    void Start () {
       
    }
   
    // Update is called once per frame
    void Update () {
   
    }
    public void SpawnPlayer() {
        Instantiate(PlayerPrefab, transform.position, Quaternion.identity);
    }
}

I only want it to spawn the object once.

Sounds like you have multiple instances of the script

I do not. I attached an image, there very few things in the scene, there is only one spawn point besides the function to spawn the Player gets also called whatever the player dies and when that happens only one Player is spawned. if I had multiple copies of the script then it would also spawn multiple players GameObjects when the player dies not just in Awake().

I also tried running if (Player == null) before calling spawn player with the same result, duplicated player.

1651479--103067--spawnscript.jpg

And none of the other gameobjects have the script?

Everytime someone complains about this problem, it always turns out they have another instance of the script somewhere.

There’s nothing wrong with the code.

I would put a Debug.Log into the spawner, logging the name of the object calling

Nope, but I was about to edit my post to say I discovered what it was, I didn’t had a second script (like i said then it would have spawned two players always and not only in Awake()) but what happened was the Gamemanager had the bool IsDead set to true even though I have it set to false by default in the script, I might have set it to true by mistake in the editor at some point. Totally my fault.