Import * equivalent?

In python you have the ability to say, for example:

from math import *

As I understand it it imports everything from math namespace into current namespace, so instead of having to write, for example: “Math.Floor(x)” you can just say “Floor(x)”. Is there any way to do this in C# so that I don’t have to keep writing Mathf. at the beginning of each and every single math operation. I know import * is not recommended, but I always do this with math functions.

Unity’s “Math” is not a namespace, it’s a class with static methods. Floor is a static method, so it doesn’t exists on it’s own, you can’t just call “Floor(x)”.

You can use the using to create an alias for Math to make it faster to write like someone suggested here: syntax - Can Math references be shortened in C#? - Stack Overflow