0

This is my super simple script in unity:

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

public class script : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("Something");
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

I attached the script to main camera:

main_camera_properties


After I run the unity game, the console is empty, meaning that the script won't run.


This is just a new project I created to test this because in my original project unity spontaneously stopped executing scripts. I uninstalled the old version (2019) and installed a new version (2020) as well as Visual Studio (even if it wasn't necessary), but didn't make a difference.

1
  • 2
    are you sure that there is nothing in the search bar of the console and the Log messages are enabled? In general you should maybe not use script as name for your components ;) Commented Apr 13, 2021 at 12:34

1 Answer 1

2

The code that you provided seems to work fine. A potential reason for why your console window is empty might be due to either having something in the search field or having the standard logs disabled.

enter image description here

Sign up to request clarification or add additional context in comments.

6 Comments

@Gabi No worries. These kind of issues happen to everyone at some point.
Didn't I comment exactly that before? ^^
@derHugo What specifically?
are you sure that there is nothing in the search bar of the console and the Log messages are enabled ;) My previous comment was more addressing OP ;)
Ah, that. I guess great minds think alike. :D
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.