One Unity Editor To Rule Them All

  Рет қаралды 12,032

Warped Imagination

Warped Imagination

Күн бұрын

Пікірлер: 24
@bluzenkk
@bluzenkk 2 жыл бұрын
you know.. there aren't alot of youtube videos on how to make custom editor tool. so if you you know this stuff, its a good idea to make more video on how to make them.
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Yeah I have a list of topics to cover and a number are around the editor You'll also see little gems for the editor entwined in my other tutorial videos
@scriptbrix
@scriptbrix 2 жыл бұрын
Instead of checking the namespaces wouldn't it just be easier to create an abstract class, call it whatever, why not EditorBehaviour and let that inherit from MonoBehaviour. Now in your CustomEditor attribute, you just say typeof(EditorBehaviour) and let your Tree class inherit from EditorBehaviour instead of MonoBehaviour.
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Absolutely valid method and one I show in a few other videos on the channel and discuss in other comments (but I should have maybe stated a little more in this video too).. this video just shows a different option. Maybe you want to capture other classes you dont own or ones that are deriving not from Monobehavior directly, you could do this video or simply create customs for those. Gotta love those options Unity gives
@leos-clockworks335
@leos-clockworks335 2 жыл бұрын
Great video, thanks! This gave me a lot of ideas on where I could expand this (Debugging, more actions etc) So I'll play with this a bit and see where it gets me.
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Glad to hear you liked it .. do come back and continue the conversation once you've played with it.
@fmproductions913
@fmproductions913 2 жыл бұрын
Thanks for the video! I was hestiant to make an Editor that encompasses all MonoBehaviours, but you shared some interesting ideas for it
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Glad it got the brain juices running .. I wondered about making this video, but I guessed my audience would like to see these little options
@mathboy8188
@mathboy8188 2 жыл бұрын
Very cool idea. Here's a thought about how to use this idea with an opt-in approach, instead of this video's seize-all-Monobehaviors-then-maybe-opt-out-for-some approach: I'd have to test this, but since the constructor of the attribute CustomEditor() takes a C# System.Type, and interfaces are C# types, the attribute CustomEditor might accept an interface? So the idea would be to create an empty interface, maybe called IUseMasterEditor, and then "implement" them on any classes you want to use this special editor. You'd lose this video's magic of "it just works everywhere without any added code", and you'd be constrained to your own code only, but it's a minuscule amount of code to add (literally just ": IUseMasterEditor") where you want, and it does give you perfect control. But again, I haven't checked that [CustomEditor(typeof(IUseMasterEditor))] will even work.
@WarpedImagination
@WarpedImagination 2 жыл бұрын
What a great idea I did remember reading somewhere that the inspected type parameter must inherit from MonoBehaviour or ScriptableObject .. but I gave it a try as it was such an interesting concept and unfortunately it didn't work out with a basic interface (not too say there isn't a hack to find to fix it though). Do let me know if you find a work around for it though as that would be a nice touch!
@omg33ky
@omg33ky 2 жыл бұрын
@@WarpedImagination one very simple fix would be to make your own class that derives from MonoBehaviour and just use that instead of the normal MonoBehaviour you have in the script that should have the editor and in the editor script only take derivatives of that wrapper class. That has some problems if you want to create derivatives of a class that should also have this editor but in other cases it works perfectly fine
@WarpedImagination
@WarpedImagination 2 жыл бұрын
​@@omg33ky Yep certainly is one of the options and a fair path to walk .. the original little trick is nice as we don't derive from anything we can just keep building components deriving from whatever (as you state), so if Math Boy's interface idea had worked it would have been so tidy .. but Unity provides and it also takes away .. lol
@revilorere
@revilorere 2 жыл бұрын
Fascinating!
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Glad you liked it
@computer1889
@computer1889 2 жыл бұрын
Oh? I didn't expected what I see. So you have a small subscribers huh... Just please... continue doing helpful videos, I visited your channel and it may have small views right now but in the future, people will thank you about this. Heck, I even see old videos that gets million of views after few or several years... But do you know what xD... so far, your thumbnails are very well-made... that If I judge it, I would think it has hundred of thousands of views 😂 I don't use Unity yet, I just saw this video and it looks interesting, so I watched it ;)
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Thank you for the kind words .. a lot of the content I create is a little niche so maybe over time as the word is spread the channel will grow. No rush I will just keep turning out the fun stuff .. but feel free to tell your friends!
@trashcaster
@trashcaster 2 жыл бұрын
Cool video. Would it not be better to just create a custom script, say MyMonoBehaviour, that extends MonoBehaviour, and is used as a base class for your other classes, and use typeof(MyMonoBehaviour)?
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Glad you liked the video. There are quite a few ways to get this base editor functionality and the one you mentioned is a great option that I think would suit so many more than what I showed here .. thanks for putting it in the conversation. In this video I wanted to show the possibility so as it spur another option, maybe someone wants to decouple a library from others so that library is no longer required but optional, no base monobehaviour that the other libraries would require .. so many great paths Unity is so much fun!
@zekiozdemir420
@zekiozdemir420 2 жыл бұрын
Thank you!
@WarpedImagination
@WarpedImagination 2 жыл бұрын
You're welcome!
@chancerosenthal7253
@chancerosenthal7253 2 жыл бұрын
Can you name some situations in which generic editors like this would be genuinely useful? I am deeply skeptical of the Unity ecosystem's penchant for introspective doohickeys.
@WarpedImagination
@WarpedImagination 2 жыл бұрын
"Doohickey" now that is a word I haven't heard in forever and one that should be used so much more in day to day conversations. Some people love generic editors others despise .. no judgement either way .. some prefer the static resource class that holds all their functionality referenced into each specific custom editor while I quite like the single source where I can place a lot of functionality and spin custom attributes to define functions or properties in the component as items of interest for a base editor to display, while refining certain items in a derived custom editor as needed .. a sort of enhanced property drawer.
@MarekNijaki
@MarekNijaki 2 жыл бұрын
Nice tricks
@WarpedImagination
@WarpedImagination 2 жыл бұрын
Yep I do enjoy the little tricks in game tools development
Quitting Within The Unity Editor
3:30
Warped Imagination
Рет қаралды 1,9 М.
Take Control of Unity's Editors for Ultimate Customization
8:01
Warped Imagination
Рет қаралды 2,2 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 16 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 9 МЛН
Custom Attributes In Unity
27:00
Warped Imagination
Рет қаралды 6 М.
Never Release a Broken Unity Game Again
5:24
Warped Imagination
Рет қаралды 2,5 М.
Quick Scene Setups In Unity
7:14
Warped Imagination
Рет қаралды 2,8 М.
Watch This Before Working on a Big Game in Unity
18:44
John Leorid
Рет қаралды 299 М.
Never lose that scene view in Unity
4:51
Warped Imagination
Рет қаралды 2,1 М.
Advanced Game Object Creation In Unity
6:14
Warped Imagination
Рет қаралды 2,8 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,6 МЛН
The Power of Scriptable Objects as Middle-Men
17:41
samyam
Рет қаралды 129 М.
Unity Code Optimization - Do you know them all?
15:49
Tarodev
Рет қаралды 197 М.
Speed Up Compile Times in Unity with Assembly Definitions
9:54
Game Dev Guide
Рет қаралды 92 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 16 МЛН