What does a gear icon mean when representing a C# script in my scripts folder?

Hey Unity fam, I’m going through the 2D Roguelike Tutorial and have a few questions about a specific script file icon.

When I created a new C# script in the scripts folder and named it BoardManager, the regular C# script icon was produced to represent the script. But when I created another C# script and named it GameManager, it came with a gear icon. Any scripts that I created afterwards had the regular C# icon.

My questions are,

What is the significance of the gear icon?
I read a thread explaining that it’s a phenomenon triggered by the file name GameManager, and it sounds like the gear may represent a gizmo, but I’ve yet to learn what a gizmo means and does. Posters recommended to add a space in the file name, but as of now I have no reason to change the icon to the regular C# one.

And more importantly, when Unity assigned this script a gear icon, did it change anything else (such as how the script is viewed or processed by Unity) that could affect anything in my scripts or in the editor, or the development of the game in general?


The folder is shown in the attached image below near the bottom right corner. This is a screenshot from AFTER I entered code for these scripts, not from when the phenomenon first arose. I’m using Unity 2019.1.0f2 and Visual Studio.

I realize this is a large post for a small query, but I want to be fully prepared for any potential future problems or interactions that may arise from this phenomenon.

I suspect that it is because there is “manager” in the name of the script. I created a script named “GameManager” in my project and the gear icon is there too. :slight_smile:

4457275--409024--Capture_3.JPG

I think it’s “GameManager” specifically, because “BoardManager” got the typical C# script icon. You can see it in my attachment above

This thread answered some of my questions:

“The gear icon has always appeared (to me anyway) when I have created a ScriptableObject class.
My conclusion; Somewhere in Unity there is a ScriptableObject named GameManager, not accessible to us. This is why I believe that Unity - Writing The Game Manager has encapsulated it into a namespace, to remove any conflicts within the program itself.”
“This is baked into Unity, but it’s a fake problem. It arises only when you put your user-written code into the global namespace. Don’t do it!”

Google says
A global namespace is a federation of file systems from any number of file storage devices, such as servers using NFS (network file system), CIFS (common Internet file system), NAS (network-attached storage), or file servers.

So, it kind of sounds like it might affect other things in the editor that interact with the global namespace “GameManager”. I’m really not sure though, and pretty confused about what a global namespace is.

I am going through the 2D Roguelike tutorial and noticed the gear icon and came across this thread.
A Namespace is a way in C# to logically group your code. It allows you to use the same name as other objects in other namespaces. As long as the namespace is different they can be identified as separate entities.

if you surround your class or whatever it is in your .cs file with

namespace myNameSpaceName {}

with your code inside the curly braces, the gear icon will go away. if you don’t specify a namespace, I believe your .cs file contents are considered to be in the global namespace.

Why the gear icon shows up or what Unity is doing internally I do not know.