Making some constants global?

So i have a few constants that i’m using across several different classes. Their values are just small ints, 1/2/3 etc, but i like having them centralised so i can change them later.

Right now i have them all in one of my classes, and every other class where i use them calls thatclass.myconstant

That’s starting to feel cumbersome though. I’m using them more than i originally intended across many different parts of my code, and i feel like having them bound to any specific class isn’t appropriate.

Is there any way to have constants made global somehow, to orphan them off from a class? so that from any class i can just use myconstant to get its value?

any constant/enum declared outside of a class is global. Of course, avoid some of the example names I use (stay away from anything thats system name in nature)

I have a dedicated c# file for these sorts of things usually… ie.

DataType.cs

public class Functions
{
  public const string Execute = "Execute";
  public const string Destroy = "Destroy";
}

public class Layers
{
  public const string Default = "Default";
}

then from anyclass I can access them

//pretend this is a normal class in some other file

void Start()
{
   Invoke(Functions.Destroy, 2);
}

I put them all into a class called “Constants”