Questions tagged [scriptable-object]
The scriptable-object tag has no usage guidance.
27
questions
3
votes
0
answers
58
views
How to find references to a Scriptable Object in all scenes
I'm going through the code of an open-source Unity project that uses Scriptable Objects as event channels. Currently, when I see a script raise an event (broadcast) through a SO channel, I have no way ...
1
vote
0
answers
306
views
Is it bad practice to invoke Unity event(s) in Update method?
I've delved into scriptable objects in a small hobby project of mine and have to say I very much like them. I'm interested in how they can work with the built-in Unity Events to handle a lot of the ...
0
votes
0
answers
53
views
Initializing prefabs with different scripts
I am creating a tower defense game.
Currently I have 2 different tower types 'Shooting tower', amd 'Unit tower'.
I have a Scriptable object to initialize the tower. It contains some tower properties ...
0
votes
1
answer
119
views
How to replicate TextMesh Pro Gradient ScriptableObject Interface?
I'm creating a scriptable object to store the color scheme for each level in my Brick Breaker game. There are a lot of options for how to input colors, but the way that TextMesh Pro does it for their ...
0
votes
1
answer
422
views
How to create instance of child scriptable object base on string?
I am working on an Unity3D project and I have a base scriptable object and several child classes that inherit from this parent class.
...
0
votes
1
answer
49
views
Best way to dynamically enumerate a list of types, and then route tasks based on those types?
I am programming a Jobs Queue in Unity, so that I can send Tasks/Jobs to a central queue where the tasks will be processed.
First, I defined 3 possible job types inside of a Scriptable Object.
...
0
votes
1
answer
371
views
How to use a Custom Class as a Dictionary Key in Unity, where one of the objects in the class is a List
I have a ScriptableObject that holds the data that I will put into a Dictionary:
...
2
votes
6
answers
189
views
Modelling Two Way Relationship in Unity for Scriptable Objects
How does one model two-way relationships for scriptable objects?
Let's say we have a number of items in-game, and each item can be obtained by different conditions. Some may require you to complete a ...
0
votes
0
answers
106
views
Viewing Wrapper/Container Classes from a Scriptable Object inside of the Unity Inspector
I'm making a word game to teach kids how to read and promote literacy. As part of that, I made a Scriptable Object that's basically a bunch of nested Lists, until it reaches the bottom node:
...
2
votes
2
answers
4k
views
Structuring a Scriptable Object so that it has a List or an Array of 2 other Scriptable Objects
I created three Scriptable Objects for my Unity word game:
FeemData - This is to hold information on letters
NeemData - This is to hold information on pronunciation
SuperNeemData - This is to hold #1 ...
1
vote
1
answer
377
views
Putting a List of Scriptable Objects inside of another Scriptable Object
I'm making a word game in Unity.
I've made two Scriptable Objects. The first one is for FeemData.
...
2
votes
1
answer
919
views
How to design an upgradeable skill system?
In my game skills can be leveled up to modify base stats like reducing cooldown by 20% and increasing fired projectile count by one. How would I architect the system so that each skill has its own ...
1
vote
1
answer
551
views
How to get data from a Scriptable Object into a Prefab template
I made a Unity Prefab where about 5 things vary. I then made an invisible GameObject where I use Visual Scripting to hardwire the 5 differing items, in order to create the various GameObjects I need.
...
0
votes
1
answer
345
views
Adding a color picker to a Scriptable Object
I made a Scriptable Object, and added a bunch of fields to it: string, Vector3, Sprite, etc.
So far, so good! I'd like to also add a field with a simple color picker in it, that allows me to set the ...
1
vote
1
answer
104
views
Decouple shared data from consumers
I am a former Unity user, and after a big pause in game dev decided to try out Monogame (I'm a software engineer IRL so I'd figure this is the best way to go).
In Unity I was using scriptable objects ...
0
votes
1
answer
38
views
Equipped weapon does not appear in JSON data
I'm trying to make an RPG style game with equipment using ScriptableObject, but whenever I equip the item, it does not register in my JSON data.
Here is the script ...
0
votes
1
answer
335
views
Optimal Way to Create Card Templates in Unity 2D
I have a couple questions involving software architecture and best practices in Unity. Although I have some programming knowledge, I am just starting with Unity and C#, and I would like some input ...
0
votes
0
answers
935
views
Loading external file data into Scriptable Object in Unity
I've been at this for two long days, trying to figure out a way to handle saving and loading data for a mobile puzzle game I'm working on. The game has level packs and each level pack has multiple ...
2
votes
1
answer
3k
views
ScriptableObjects events execution order?
Given the code:
...
0
votes
0
answers
419
views
Unity - On Custom Editor Update Event
The following code is a snippet of how I'm auto-updating an object whenever a setting changes in the inspector window (for a scriptable object). It's currently not working, but It will work if I put ...
0
votes
1
answer
338
views
Extending a ScriptableObject to have a get property instead of a field, without losing serialized data
I have a ScriptableObject that's already used extensively in my project:
...
0
votes
1
answer
2k
views
ScriptableObject's custom objects begin reset to default?
I'm using ScriptableObjects as a way to serialize objects that I work with in an editor script. I save them as assets using ...
0
votes
1
answer
2k
views
Ability system in Unity: Scriptable objects and collections of generic types
I've decided to implement an ability system for my game and set the following requirements:
Abilities must be MonoBehaviors, that-is, components of Player/NPC ...
0
votes
0
answers
611
views
Alternative to Dictionary serialization
I am working on a set of ScriptableObjects that represent base stats for characters in my game. Think Strength, Speed, Intellect, etc. A whole laundry list of em (about 20 stats).
I'd like to later be ...
2
votes
1
answer
1k
views
Serializing nested ScriptableObjects with runtime changes
I'm making an effort to use ScriptableObjects more in my game architecture, after watching a fantastic Unity Unite talk on the subject. The central idea is to use ScriptableObjects, during runtime, as ...
0
votes
1
answer
379
views
Using Part of prefab as script parameter
I'm trying add a weapon to Eithan - the third person character. So I want to take his hand, which is part of the prefab Eithan (the weapon location) and use it in the my Player.cs script to ...
0
votes
1
answer
79
views
Replacing UI GameObjects with Scriptable Object script
In my game I'm trying to make a series of mock web pages. To make it easier, I thought I'd make all the webpage UI into Scriptable Objects and have a game manager script determining what content to ...