I apologize for noobish question. How would I go about making a script filled with functions that you can call from any script. Similar to how Math.Lerp() fiddles with the input and gives a output, not that actual way, but that type of function. I’m sure there is a way I just cant find it.
Create a public static class with public static methods inside of it. This public class can be put in any script file: In Assets > Create > C# Script. Just make sure it is public static and not a monobehaviour
Ex.: MyMethods.cs
public static class MyMethods {
public static string Hello () {
return "World";
}
}
Now you can call from any script MyMethods.Hello();