Script appears as-is in Unity

Hello. I’m restarting the Number Wizard project and am not seeing what I expect in the console. Instead of saying, “Welcome to Number Wizard!” it has the script as-is. Here’s my code:

   using System.Collections;

using System.Collections.Generic;
using UnityEngine;

public class NumberWizards : MonoBehaviour {

// Use this for initialization
void Start () {
    print ("Welcome to Number Wizards!");
    print("Pick a number in your head, but don't tell me.");
}

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

}

Apologies- it seems the code formatting is a bit funky.

Do you have a screenshot of what that looks like? I have never seen actual code appear in the console.

Unity_console

OK, sorry if that’s a dumb question, but are you sure that’s the console and not the inspector?

I think you’re right- it is the Inspector. The console shows an error in index.html under (it’s a long path) /Packages/node_modules/unity-editor-home/dist and this happens with any project, even a fresh one. I’m using 2017.1; might that be the cause?

It is normal for the inspector to show the content of script files when they are selected, so no worries there :wink:
As for the error you’re getting, I think it’s a common bug in 2017.1

Here’s what a Unity staff member said about it (if that is indeed your error):

"This message is harmless, but you can still try to navigate to this location:

C:\Users\name\AppData\Roaming\Unity\Packages

First make a local backup, then delete everything in this folder. When you restart Unity, needed packages will be downloaded and hopefully the error will not appear. If you still see the error, you can safely ignore it for now."

The plan is the fix will be in 2017.2 final, no specific ETA yet.

https://forum.unity3d.com/threads/error-loading-launcher.486127/

Privacy & Terms