Protofactor's nightmare fuel is on sale for a limited time here assetstore.unity.com/packages/3d/characters/creatures/sci-fi-karciniactus-296777?aid=1101liVpX
For custom inspectors (and similar extensions) instead of reflection I recommend to inject your own editor extension into the original assembly through asmref definition. It compiles into it so there are no runtime-shenanigans.
I have been asked to do an assembly definitions video quite a few times, but needed an angle that hasn't really been touched on .. assembly references might be the twist to add
Sometimes I can't find a good use case for some of your videos, but now, THIS IS WHAT I NEED. The box collider is not automatically aligning itself with the transform is driving me nuts
I haven't done that before. The tab menu is hidden behind the DockArea class which again is internal and would be a pain to override. If you have your own window overriding GetExtraPaneTypes() will enable you to add your window type to the add list. As for the process of duplicating a window thats simple enough by getting EditorWindow.focusedWindow then using EditorWindow.CreateInstance
Editor API is the big unknown as there are not many tutorials, and honestly, it is not very friendly I created utilities like creating materials from textures or customizing scriptable objects to expose their members in Inspector...A little work that can save hours in every project
Editor API used to get more love, back when they did developer livestreams & workshops more often. When I started in Unity, Mike Geig & Adam Buckner (later Matt?) were doing dev streams at least monthly, covering all kinds of deep-nerd stuff, incl hacking the editor.
Neat! I avoid internal API reflection as a rule - enterprise dev habits - but menus & custom editors are my go-tos. Just did a Cinemachine dashboard incorporating TV multicamera movements & terms, incl custom spline paths and action-safe & rule-of-thirds composition guides. Then updated to CM3.1, which made their GameView GUI handler inaccessible 😅 Far as I'm concerned, being able to break, remold, and extend the Editor as you need is Unity's 2nd-best strength as an engine. It's top strength would be "port to anything" 😂
Glad you liked it I heard from a fellow dev that Cinemachine changed a fair amount for the better as far as usability, but I could guess that came with a lot of back end breaking changes
@WarpedImagination They had a video a year or so back about it. Since it was external software that they bought, it did a lot of stuff that wasn't inline with how Unity normally works. Like using hidden objects and using 1 inspector for 3+ components. The main change for CM3 was unpacking all the "hidden" stuff so those components each sit on the associated virtual camera object. They also cleaned up the 3-axis orbital follow cam to be a little less insane 😅 Everything else was renaming - mostly going from film & TV terms to game-dev terms. (I edit cameras better in the former, hence my dashboard.) They included a wizard & contextual menus (with utility commands) to auto-update existing objects & scenes, but custom scripts have to be updated by hand. They actually recommended folks with a lot of custom tools just park on CM2 😮
Hey thats awesome, can we edit particle system and add multiple spawn points to 1 particle system ? Creating multiple particile system kill a lot of performances on mobile devices, thats why i ask
Not really the intended for this functionality .. you might want to dive in deeper to the visual effect graph and see if you can customize enough to get the performance without killing the look
Great video! This tip will definitely come in handy. One thing is that I wanted to add an easy access button to round the position values in the transform to ints. But I'm not sure if this technique will work on the transform component since it's the base block of any game object and maybe behaves differently to the other added components?
@@WarpedImagination thanks again for the referral! I've watched it and it's also a wonderful tip to keep in mind. I really appreciate all these Unity efficiency tips.
Hey. Have you looked at all into customizing the asset browser? I found that it's the window that's hardest to customize (requires a lot of reflection).
I turned scene view's move, rotate, and scale tools into 2D versions of them on XZ plane for a plugin I've been working on. It's a shame they cannot be customized without using reflection.
Good question, I should have stated its because for tools such as those shown in the video it's unnecessary. It makes things a little untidy to have editor only components for this sort of functionality and of course you don't want them in the build so you'll want a build processor to remove or play with the hide flags.
Unity has sooo much internal garbage. Half of the useful extensibility in UI toolkit is stuck behind internal fields. I don't even get it because if they're using internal functionality on extended components why is there no code review saying hey we use this all the time maybe our users would want to use it too...
Have you read their internal code? Most of it is good, but some of it is clearly MacGyver'd and can be a bit frail. I suspect that when they write stuff that "works", but is obviously not ready for primetime, and is not part of the required API, they just drop its access level and quietly close the ticket 😅
Protofactor's nightmare fuel is on sale for a limited time here
assetstore.unity.com/packages/3d/characters/creatures/sci-fi-karciniactus-296777?aid=1101liVpX
For custom inspectors (and similar extensions) instead of reflection I recommend to inject your own editor extension into the original assembly through asmref definition. It compiles into it so there are no runtime-shenanigans.
I have been asked to do an assembly definitions video quite a few times, but needed an angle that hasn't really been touched on .. assembly references might be the twist to add
How do you inject your new class or extension into their assembly? Without creating a new assembly?
Very useful, did this a long time ago for the mesh renderer, priceless addition.
Glad you liked it .. What functionality did you add to the mesh renderer?
Sometimes I can't find a good use case for some of your videos, but now, THIS IS WHAT I NEED.
The box collider is not automatically aligning itself with the transform is driving me nuts
Keeping things neat and tidy is a good thing!
Glad you liked the video.
Great video as always. I would love to see a context menu action that duplicates tabs, such as inspector, project, hierarchy, etc.
I haven't done that before.
The tab menu is hidden behind the DockArea class which again is internal and would be a pain to override.
If you have your own window overriding GetExtraPaneTypes() will enable you to add your window type to the add list.
As for the process of duplicating a window thats simple enough by getting EditorWindow.focusedWindow then using EditorWindow.CreateInstance
Thanks for advice.
Editor API is the big unknown as there are not many tutorials, and honestly, it is not very friendly
I created utilities like creating materials from textures or customizing scriptable objects to expose their members in Inspector...A little work that can save hours in every project
Absolutely spot on .. it's one of the reasons I do these videos .. showing people how to save effort
Editor API used to get more love, back when they did developer livestreams & workshops more often. When I started in Unity, Mike Geig & Adam Buckner (later Matt?) were doing dev streams at least monthly, covering all kinds of deep-nerd stuff, incl hacking the editor.
Neat! I avoid internal API reflection as a rule - enterprise dev habits - but menus & custom editors are my go-tos. Just did a Cinemachine dashboard incorporating TV multicamera movements & terms, incl custom spline paths and action-safe & rule-of-thirds composition guides.
Then updated to CM3.1, which made their GameView GUI handler inaccessible 😅
Far as I'm concerned, being able to break, remold, and extend the Editor as you need is Unity's 2nd-best strength as an engine. It's top strength would be "port to anything" 😂
Glad you liked it
I heard from a fellow dev that Cinemachine changed a fair amount for the better as far as usability, but I could guess that came with a lot of back end breaking changes
@WarpedImagination They had a video a year or so back about it. Since it was external software that they bought, it did a lot of stuff that wasn't inline with how Unity normally works. Like using hidden objects and using 1 inspector for 3+ components.
The main change for CM3 was unpacking all the "hidden" stuff so those components each sit on the associated virtual camera object. They also cleaned up the 3-axis orbital follow cam to be a little less insane 😅
Everything else was renaming - mostly going from film & TV terms to game-dev terms. (I edit cameras better in the former, hence my dashboard.)
They included a wizard & contextual menus (with utility commands) to auto-update existing objects & scenes, but custom scripts have to be updated by hand. They actually recommended folks with a lot of custom tools just park on CM2 😮
Hey thats awesome, can we edit particle system and add multiple spawn points to 1 particle system ? Creating multiple particile system kill a lot of performances on mobile devices, thats why i ask
Not really the intended for this functionality .. you might want to dive in deeper to the visual effect graph and see if you can customize enough to get the performance without killing the look
Good stuff! Would love to see some custom runtime-supporting editors using the UI toolkit, hardly ever seen content about it.
Glad you liked it
I have some UI Toolkit content lined up
Great video! This tip will definitely come in handy. One thing is that I wanted to add an easy access button to round the position values in the transform to ints. But I'm not sure if this technique will work on the transform component since it's the base block of any game object and maybe behaves differently to the other added components?
In the case you mention I would go with contextual property menus. I describe how to do those in this video
th-cam.com/video/hBrLsyLGaB4/w-d-xo.html
@@WarpedImagination thanks again for the referral! I've watched it and it's also a wonderful tip to keep in mind. I really appreciate all these Unity efficiency tips.
@@Shennzo glad you're enjoying them
I still want to see your Overlay code that implements a joystick for X/Z tilting objects.
Ok I bumped it up the list
"I never forced you to become a human light bulb!" 🤣
Glad you liked it
Hey. Have you looked at all into customizing the asset browser? I found that it's the window that's hardest to customize (requires a lot of reflection).
I haven't .. yet!
I will definitley be making the SpriteRenderer component have an option for making drop shadows 😮
Oh interesting, nice one!
Thank you so much
You're most welcome
Would you please teach how to use DOTS for beginners, like how to spawn prefabs?
Looking at the changes coming down the line I think I will have to have DOTS enter into some of the videos
I turned scene view's move, rotate, and scale tools into 2D versions of them on XZ plane for a plugin I've been working on. It's a shame they cannot be customized without using reflection.
I have a dev friend and we vent whenever we go down a rabbit hole that ends with 'internal'.
Why do you think adding side components to extend its behavior is a bad idea?
Good question, I should have stated its because for tools such as those shown in the video it's unnecessary. It makes things a little untidy to have editor only components for this sort of functionality and of course you don't want them in the build so you'll want a build processor to remove or play with the hide flags.
Simply hilarious
I try
Unity has sooo much internal garbage. Half of the useful extensibility in UI toolkit is stuck behind internal fields. I don't even get it because if they're using internal functionality on extended components why is there no code review saying hey we use this all the time maybe our users would want to use it too...
I have had that conversation a lot with other developers
Have you read their internal code? Most of it is good, but some of it is clearly MacGyver'd and can be a bit frail. I suspect that when they write stuff that "works", but is obviously not ready for primetime, and is not part of the required API, they just drop its access level and quietly close the ticket 😅