![]() ![]() I honestly am still trying to understand the concept of a ScriptableObject, so I'm not sure if I'm creating some type of paradox asking this question, but any help is very much appreciated. We have event system and many other other important systems based on SOs. But new people who will come here may find to difficult to locate a specific SO, or its Type. like attaching a MonoBehaviour ability method script to the ScriptableObject & toggle when ready.) We have all Scriptable Objects (SOs) in the ScriptableObjects folder (arranged folderwise also inside). I'm just curious if there is a way that I can grant a ScriptableObject a unique method for each one, which could just be toggled on or off from an AbilityManager (Ex. It works exactly like in the search window in the project view, so if you do: Code (csharp): AssetDatabase.FindAssets('t:MyType') you'll get all assets of the type MyType. Now I figure the normal way around this is that what ever the trigger is I decide on that switches the ability on or off would check the ScriptableObject code for an enum or boolean value to determine the specific ability, yet wouldn't that mean I would have to hard code every ability/spell? I'm not sure exactly. Now, a potentially really easy option is to make SuperNeemData not be a scriptable object at all, just a plain old C class. 1 Baste Joined: Posts: 6,132 AssetDatabase.FindAssets supports searching by type. They're all different in a drastic way, from something like health boost to freezing time to a speed dash. Yet I can't work my way around a big problem, each ability is unique. So I figured using ScriptableObjects could be a neat way of creating a flexible system. Most of my abilities share the same variables in common: I'm just testing around with a type of ability/spell system & have noticed that using scriptable objects seem like a fantastic way to get started. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |