Комментарии:
In my opinion scriptable object is just Data based I don't even know why they called scriptable object
But i discover recently the nested scriptable object and I'm curious what is the difference and how this new type I will be useful
Thanks this helped with some data issues I was having when changing scenes. I needed the data to persist through scene change, but I needed it to reset upon starting the game. Seemed like Scriptable Objects are the solution!
Ответитьone from of bests channels
Ответитьthe cleanest explanation and demo, thank you!
ОтветитьGreetings. How do I reset ScriptableObjects after each play?
ОтветитьThanks!
ОтветитьYou can make video about ScriptableObject + Tile map , Please!
ОтветитьThanks
ОтветитьWhen I use a scriptable object, and change a value (like "isHeld"), then it changes that for the prefab of it, and not for the instance. How do I fix that?
ОтветитьSo they aren't really designed for setting up references between objects?
ОтветитьIs it possible to nest scriptable objects? For example I am working on weapon rarity in my game. So would it make sense to have a scriptable object for each type of weapon rarity? Legendary vs Common weapons vs any other rarity. I want all weapons of the same rarity to have certain things in common, like the weapon card and color base. Should those be scriptable objects that I then drag onto each weapon scriptable object? Or what would be the best way to set that up?
ОтветитьThis is the only tutorial I've seen that actually made a distinction between the Scriptable Object Definition, and the Scriptable Object asset files that are instances of it.
Everyone just refers to all of the various files as "Scriptable Objects" which was really confusing to me at first.
70% of the projects I've started since learning how to use scriptable objects use scriptable objects for basically every single thing out of the still very small amount of things I did
ОтветитьHi Im doing a Card game,and I store Magic card(just run the method of that card then it destroy) method by ScriptableObject, but Its ugly to write a if Or switch(just traverse all type of magic card) method in ScriptableObject ,Is any way to just hook different method in inspector like Enum
ОтветитьThank you for this! I have been binge-watching all your videos.
ОтветитьI loved how you explained it! It made it very easy to understand! I think I can use Scriptable Objects a little bit more intuitively now; when I first read about them they seemed SO complicated!
ОтветитьWhat an annoying voice!
ОтветитьWatching this video, I can't help but think of well this would apply to RPGs
Ответитьim pretty new to unity i mean by this is posted unity isnt even installed yet! gimme some uhhh idk?
ОтветитьShould i use Scriptable Objects when it comes to individual ability of the enemies?
or I use Inheritance instead
Question! I am making a game which has a set of spells. I didn't know of ScriptableObjects beforehand, so what I did is: I created an abstract SpellBase class script (extending monoBehaviour). It contains common attributes between spells, such as name, description, cost, and cooldown, and an abstract void (UseSpell()). For every new spell script, it extends said SpellBase, adds new atts if necessary, and implements the UseSpell() void. Lastly, a SpellManager script, which makes a List out of all Spells, excluding SpellBase, and on certain key presses cycles thtough the list, and when pressing another key, will trigger the selected Spell's UseSpell() void. Is scriptableObject worth extending instead of monoBehaviour? If so, how can I retain this hierarchy without making a drastic change in code?
ОтветитьDuuuuuude, firstly you save me with your DOTS videos, now you do with this one!
Muuuuch love for you!
I am using scriptable objects to create different types of guns and store some data about them. Also, I am using your concept from the interface video to make a IGun interface and have a shoot function in it. The only issue now is how do I make scriptable object have a function that is specific to that gun so that in the main game program, i just need to pass a IGun variable and call the shoot function?
ОтветитьPlease correct me if I am wrong: so the benefit of scriptable objects is suppose I have and an enemy script that is attached to each enemy in my game. That script will have data like sprites, animations, etc which are the same for all enemies but because each script is attached to a gameobject, it will create duplicates of that data.
However, with scriptable objects, I can create only one container for that data and use that to reference the data in each enemy script. That will in turn save memory. Correct?
I don't understand differance between structs and scriptable objects
ОтветитьCodeMonkey: Can I use scriptable objects to change your simple SpriteAnimator animations at runtime. If not how could I dynamically change de sprites that can be played by the SpriteAnimator? Let say i have idle and walk animations for a unit and play them with the simple Sprite Animator from your video but i want to change the sprites of each animation at runtime to show other unit skin
ОтветитьHi @CodeMonkey
I tried to register on your site, the sending configuration email does not work please check
I wish unity could redo the "asset creation context menu" so it would be more like the "add component menu" that you can search and it oly displays 1 tree layer at a time. That would make scriptable objects way much better.
I use Odin Inspector, and I found this script that one of the devs of Odin released where It creates a "super list" of all of the scriptable objects regardless of it having a "CreateAssetMenu" attribute. So you can just search it up and create it, much smoother workflow.
Also, I'm afraid to click the like button 😬 666 likes lol
Fantastic Tutorial!
ОтветитьWell, kinda shocked to see the .ass extension at the thumbnail xD
ОтветитьWhat unity are you using? Unity hub? Or some other unity? And where do i have to go to find the script programming place that you are using right now? :D
ОтветитьI love your videos man!! How come you like saying "yup" so much?
ОтветитьWhat is the library (using CodeMonkey.utils) which is seen in many videos? How did you create? Is there a video on it?
ОтветитьDo you think it's a good idea for a beginner to copy code from stack overflow until you learn them?
ОтветитьYou explained it very well. I made a tutorial series for a Turn-Based RPG like Pokemon, where I stored the data of pokemons and their moves using scriptable objects. Now, I can point people who are unfamiliar with it to this video, so they can understand the basics before following my series.
ОтветитьIndonesia here
ОтветитьReally awesome video and good tip regarding SO are sent by reference. That will definitely save the memory. Cannot wait to see next part about custom editor. That makes scriptable objects ideal for custom Editor tool! Thanks for you job and sharing your experience with us!
ОтветитьHello everyone Tell me how to make it easier and more practical: data Exchange between scripts. For example: Get position(). Create a script containing all the others-inheritance - get-set...? Use interfaces for each necessary function ? Or are there other options ?
Ответитьoh man... been following and supporting your work for months now and finally I decided to slow the video intro down to 50%, because it was getting to me how your into says "inept" tutorials .... not only now I know that you mean "In depth" but the best part is how you sound at that speed! Thank you and keep up the awesome work!
ОтветитьI am a designer myself, so I just clicked it.
ОтветитьMan you're really doing great job!!!You are using your time and skills to make our journey easy.Huge Respect and love for you.🤗
ОтветитьThanks for this awesome video. I have one little question. If i use a scriptable object for an object(for example bottle of water) and i buy three of them in the game. I can't store the amount in the scriptable object ,right? Because then it will overwrite the asset. How would you save the amount of the item? Thanks again for you great videos and i am looking forward to everything on this channel.
ОтветитьPls help me I'm just a student and know very little (almost nothing) about programming can you help me where to start, I'm just starting so pls help.
ОтветитьDebug.love()
Ответитьanother level of json file😉.......
ОтветитьThe only things that annoys me is how they keep the runtime changes when running on editor. Changes dissapear after restarting unity but sometimes is a hustle specially if youre using Unity Collab
ОтветитьI know everyone is requesting vids from you, theres something Im really struggling with called the observer pattern. More specifically how to implement it on the UI.
If youre ever thinking of what tutorial video to do remember Codemonkey observes the observer pattern.
Scriptable Objects can not only store data, they can also used for things like communication between entities.
Its often a better alternative to use scriptable objects than to use Singletons (witch you shouldn't use that much, only in really rare circumstances, some say you shouldn't use them at all).
Also, ScriptableObjects can contain logic.
If you make them abstract, you can use derived scriptable objects to implement the logic of a gameobject.
Its more flexible than using different MonoBehaviours and you can hot swap behaviours without destroying and replacing MonoBehaviours.