Hey folks,
I'm trying to make some scriptable objects to contain variables and functions for different tools in my game. However, I can't find how I'm supposed to make 'em in Javascript so that my other Javascript scripts can see/interact with them. I made the desired scripts in C#, but none of my other scripts can see them of course.
I want to ask, once and for all, how do you make a javascript scriptable object? I found somewhere
class MyScriptableObject extends ScriptableObject{ }
So I wrote,
class ToolBehavior extends ScriptableObject{}
and hoped to use "extend" to use it as an abstract class, like this:
class WelderTool extends ToolBehavior{}
But this results in nothing; I can't plug either ToolBehavior nor WelderTool in as a ToolBehavior variable in the inspector. It doesn't want to be attached like a monobehavior either.
Halp! One working example code would do it!
↧