Hi,
I just snagged a graphing asset from the store and after import and placing it in the correctly named folders I can’t figure out how to access a function in the main class.
I assumed I could create a gameobject to hold a new instance via Find then but visual studio isn’t having any of it. So am I supposed to create a new gameobject to host the main class script?
I have googled the crap out of this but I can’t seem to find a straight answer on the proper workflow.
Is the class derived from MonoBehaviour? If yes, you can attach it as a component to a GameObject in the scene, yes. If not, it’s intended to be used in code you write yourself. In this case, you would create your own script and add it to a GameObject to run. Within the code you may need to import a specific namespace via the “using” statement in C#, but then you can access the class. If it has static functions, you can just use them like Mathf.Abs(), but if the class is not a static utility class, you will have to create a new instance in C# code (this is different from creating components, but probably not the case anyway, and if it were there should be documentation about it).