This is really great, tho I would like to know, what unity version are you using? I get a bunch of compiler errors from the package when building and my assignment thingie's due tomorrow
@ButtonFactoryGames
3 ай бұрын
2022.3.0f1. If you link your github I can take a look if I get time. No promises.
@PhelBot
3 ай бұрын
@@ButtonFactoryGames it's okay I managed to solve it by using conditional compilation on the scrips from the package that were throwing an error, unity apparently removes the UnityEditor namespace when you build hence the error. Thanks for the response anyways, also think you could maybe implement a solution for this? Given the time and desire to ofc.
@rise6471
3 ай бұрын
@@PhelBot Haha no that's the engine I'm afraid. You gotta get used to conditionally compiling headers or putting your editor stuff in an editor folder that isn't built.
@ButtonFactoryGames
3 ай бұрын
^ this is right. Did I forget the editor folder?
@MsRedNebulaPlays
4 ай бұрын
Great explanation, thank you! I got the serialization depth limit exceeded warning, and it's something I'd never encountered before. You helped me figure out not only what was going on, but that I still had two classes set to [Serializable] that didn't actually need to be anymore, heh. BUT now I know about this issue and learned about [SerializeReference], a bonus all around.
@qichengliu9260
4 ай бұрын
Absolutely amazing🔥
@jamez0r
8 ай бұрын
Thanks so much for explaining this - was dealing with the recursive serialization issue and this info helped a lot!
@cosmindiaconescu
11 ай бұрын
Really nice! Keep up the good work!
@mikhailhumphries
Жыл бұрын
Why would you need to serialize a script?
@nuin9937
9 ай бұрын
Custom data types, like what if for some reason you want a vector10
@322ss
Жыл бұрын
Thanks. 2:45 - at least in later versions of Unity (2022.3) serialize references are visible in the inspector. Like a list of animals with cats and dogs shows each sub class fields OK. Or did you mean something else, I don't know about interfaces and such yet since I've used SerializeReference very little so far. To add items to list without some neat add-ons, I've simply created ContextMenu items like "Add class A", "Add sub class B" for each class and sub class I need to add to my list in that specific MB script.
@322ss
Жыл бұрын
Seems like you have a fancy solution for this, noticed this now after I watched the whole video to the very end.
@ButtonFactoryGames
Жыл бұрын
@@322ss Yeah I have a list attribute override that lets you view and add subclasses. You are correct about viewing lists in the inspector, thats new, but you can't see/add subclass data am I right? Fingers crossed I didn't waste a weekend!
@322ss
Жыл бұрын
@@ButtonFactoryGames You can't add sub classes directly, but like I said, you can create a simple method like AddCat and decorate it with ContextMenu("AddCat") and that way you can add a Cat in a list of Animals, and Cat fields will show up in the inspector, with both (now) default reorderable list and old style list.
@322ss
Жыл бұрын
And I might add, that this works at least with Unity 2022.3.0f1, that is the version I tried this with.
@322ss
Жыл бұрын
@@ButtonFactoryGames I don't know where my answers went, but yes you can add sub class instances to a base class list, fields will show up for Ducks and Cats in a List of type Animals.
@Ofangio
Жыл бұрын
My man this is fantastic! I do hope you continue to support and expand upon this moving forward. Where's the best place to request more features? Cheers.
@ButtonFactoryGames
Жыл бұрын
Just comment here tbh! The only improvement I can think of right now is the option to be able to add instances of the superclass, but you can change that yourself if you peep through the code.
@Ofangio
Жыл бұрын
@@ButtonFactoryGames Thanks for the reply! Big thing I can think of right now is the ability to copy/paste the subclasses from the editor, as you can do with normal serialized class/struct fields. Other than that, maybe just having the ability to clean up the display names in the inspector, but that's super minor!
@ChronoWrinkle
Жыл бұрын
good god, this is a saver
@olepatrick1053
3 жыл бұрын
this is amazing, i've been trying to do this forever. and also you colours are very good
@ButtonFactoryGames
3 жыл бұрын
Me too I was just procrastinating one day and got lucky. it has some issues but its super simple. Thankyou very much soz for crap audio
Пікірлер