Debug.Log not outputting in all scripts

My Debug.Log() function is not showing in all of my scripts, and yes, most of them are attached to gameObjects. I can’t seem to get the reason why it doesn’t show up. I also have the console debugging enabled, and I put Debug.Log("AAA") in the update function, without any if statements, while statements, or for statements around it. Here is an example:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour {

    [HideInInspector]
    public static FloorBar[] floorBars;
    public static Vector3 pos;
    public Vector2Int floorBarSize;
    public static GameObject go;

    public void DefineVars(FloorBar[] floorBarsA)
    {
        floorBars = floorBarsA;
        pos = new Vector3();
        go = gameObject;
        SetPos( new Vector2(0,0));
        gameObject.SetActive(true);
    }

    public void SetPos(Vector2 desiredPos)
    {
        int posIndex = PosToIndex(desiredPos);
        Debug.Log(floorBars[posIndex].gm.transform.localScale.y);
        Vector3 posToAssign = new Vector3((int)floorBars[posIndex].pos.x, (floorBars[posIndex].gm.transform.localScale.y / 2 + 0.6f), (int)floorBars[posIndex].pos.z);
        if (posToAssign.y > pos.y &&
            (posToAssign.x != pos.x || posToAssign.z != pos.z))
        {
            gameObject.SetActive(false);
            UIScript.stSetCanvasOffset(UIScript.canvasList[0], new Vector2(-1, 0));
        }
        pos = posToAssign;
        gameObject.transform.position = pos;
    }

    public static void Restart()
    {
        for(int i = 0; i < floorBars.Length; i++)
        {
            floorBars*.nextHeight = 1;*

floorBars_.CalcHeight(floorBars*.nextHeight, 1);
}*
pos = new Vector3((int)floorBars[0].pos.x, (floorBars[0].gm.transform.localScale.y / 2 + 0.6f), (int)floorBars[0].pos.z);
go.SetActive(true);_

}

public void Update()
{
Debug.Log(“AAA”); <— Here is my Debug.Log
if (!UIScript.paused)
{
if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow))
{
if (!IsOutOfBounds(pos + new Vector3(0, 0, 1)))
{
SetPos(new Vector2(pos.x, pos.z + 1));
}
}
if (Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.LeftArrow))
{
if (!IsOutOfBounds(pos + new Vector3(-1, 0, 0)))
{
SetPos(new Vector2(pos.x - 1, pos.z));
}
}
if (Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.DownArrow))
{
if (!IsOutOfBounds(pos + new Vector3(0, 0, -1)))
{
SetPos(new Vector2(pos.x, pos.z - 1));
}
}
if (Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.RightArrow))
{
if (!IsOutOfBounds(pos + new Vector3(1, 0, 0)))
{
SetPos(new Vector2(pos.x + 1, pos.z));
}
}
SetPos(new Vector2(pos.x, pos.z));
}
}

public bool IsOutOfBounds(Vector3 desiredPos)
{
return desiredPos.x < floorBars[0].gm.transform.position.x ||
desiredPos.z < floorBars[0].gm.transform.position.z ||
desiredPos.x > floorBars[floorBars.Length - 1].gm.transform.position.x ||
desiredPos.z > floorBars[floorBars.Length - 1].gm.transform.position.z;

}

public int PosToIndex(Vector2 pos)
{
return (int)pos.y * floorBarSize.x + (int)pos.x;
}

}

Good day.

 public void Update()
 {
     Debug.Log("AAA"); <--- Here is my Debug.Log
  ....

This should be showing you in the console the AAA messsage. If not, can bo for…:
The script is not active in the scene (no objects with it, or it is disabled, or the object are not active, or there is another script preventing to do it.)

Other scripts are working fine? Are you using some while look somewhere and is looping infinity times? Do you have your console messages activated?

Can you just debug the code with the program you use to scripting and check if the execution reaches your script?

Is the script correct? the name of the script is Unity is exatcly “PlayerController” ? HAve any error that prevents Unity preload the script, and update changes?

So many questions… in “normal” situations, this code works, so, try to discover why is not working.

Bye!