Questions tagged [scriptable-object]
106 questions
1
vote
0 answers
How can my ScriptableObjects have a SerializeField reference to a Script?
Each enemy in my game is a Scriptable Object (Enemy1, Enemy2, etc). Each enemy also has its own unique script to determine how battles go (BattleEvent1, BattleEvent2, etc)
The way my logic currently works is:
BattleSystem component has all…

damon
- 2,687
- 8
- 25
- 35
1
vote
1 answer
ScriptableObject, added a field, Assets not updating, how to?
Newly added field in ScriptableObject class not being put into assets of its type. Is this something todo with how Scriptable Objects work? Is there a way to update a scriptable object asset without losing existing info in already populated…

Confused
- 6,048
- 6
- 34
- 75
1
vote
1 answer
ScriptableObject build error with Inheritance but runs fine in Unity Editor
here is the error i recieve:
the error is on this line.:
if (pItem.isStackable)
{
}
I should note that the error only occurs when I build the game. It does not occur when I run the game in the editor.
I believe the error comes from trying to…

Arcturus groviteer
- 49
- 9
1
vote
1 answer
Unity (Custom Editor) Save Data When Exit Unity
I created a simple Custom Editor that shows how much time I spent on Unity. When the button on it is pressed, it records the start time in a Scriptable Object (It's dirty). When the button is pressed again, it records the end time. If the window is…

sadrag
- 555
- 2
- 7
- 19
1
vote
0 answers
How do I properly use Scriptable Objects to create Items at runtime?
I'm relatively new when it comes to game development, but I've spent a dozen or so hours researching about how to use Scriptable Objects (SO).
I don't know how many items my game is going to have, so I would like to automate the item-making-process…

Jaitnium
- 621
- 1
- 13
- 27
1
vote
1 answer
Replace ScriptableObject with Firebase
I'm making a multiplayer quiz game and I used Scriptableobject to store my quiz data. Now I would like to change it and use Firebase but I hit the wall with it.
I Have a scriptable object to store my questions:
Code…

Kamild160
- 11
- 2
1
vote
1 answer
JsonUtility.FromJsonOverwrite error unity
Hi I am using a scriptibleobject in unity that holds data for the store in my game it has been working fine for awhile now, but when I opened unity today after updating unity hub I got this error in my code
ArgumentException: JSON parse error: The…

Powplowdevs
- 55
- 1
- 2
- 8
1
vote
1 answer
Creating / Initializing Scriptable GameObjects during the gameplay in Unity3D
Scriptable Objects can be used as data containers in Unity3d. They don't need to be attached to a GameObject in a scene but they can be saved as assets in our project. Most often, they are used as assets which are only meant to store data.
We can…

Sakuna Madushanka
- 168
- 16
1
vote
0 answers
Dynamically generate interface using ScriptableObjects
Hello fellas!
Currently working on an AR application, I am learning and playing around with the ScriptableObjects.
With a little to no programming background (less than an effective year), I am struggling a little bit on some parts.
I am trying…

nooxouille
- 59
- 1
- 7
1
vote
3 answers
Creating a scriptable object in runtime - It creates instances but doesn't save them in asset folder?
So I have a little question I'm creating scriptable objects first time from spreadsheet data
trying to use the database to automagically make them...
for (int m = 0; m < myAssets.Count; m++)
{
Drill_WordBase newWordAsset…

StackBuddy
- 577
- 5
- 17
1
vote
4 answers
Unity: Custom Inspector for ScriptableObject not working
I created a custom Inspector for some of my ScriptableObject. The inspector seems to work perfectly. If a value gets changed in the inspector, this value is used in game. But as soon as I restart Unity the value is back on its old value, so the…

Timisorean
- 1,388
- 7
- 20
- 30
1
vote
1 answer
Instantiating ScriptableObjects
Can anyone tell me about advantages/disadvantages of my approach?
I have status effects , skills as Scriptable Objects, with unique fields, that differs for every in-game character (like duration, damage, castTime, that all depends on individual…

Ivan Ivanov
- 11
- 1
- 4
1
vote
1 answer
How to use a ScriptableObject for a level's Prefab transforms?
I have 3 types of Prefab: A, B & C
Whilst designing the levels, in Play Mode, I add and position them within the level.
How do I create a ScriptableObject that holds references to all of the instances of these prefabs and their transforms?…

Confused
- 6,048
- 6
- 34
- 75
0
votes
2 answers
Set value when ScriptableObject is created
In Unity, is it possible to automatically set a value when a ScriptableObject is created?
In the following example, I have a parent class, PickupData, and a child class, MoneyPickupData. Whenever an SO of the child class is created (via right-click…

Ben
- 15,938
- 19
- 92
- 138
0
votes
1 answer
How to reference static functions in Unity inspector
I have a scriptable object class Attack and created some assets from it.
In the Attack asset inspector, I want to be able to reference static functions from other classes, so when something happens, I can grab this static function referenced in…

Daniel
- 7,357
- 7
- 32
- 84