Take Control of Unity's Editors for Ultimate Customization

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 47

  • @WarpedImagination
    @WarpedImagination  2 หลายเดือนก่อน +2

    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

  • @LurkingNinja
    @LurkingNinja 2 หลายเดือนก่อน +8

    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.

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +11

      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

    • @mandisaw
      @mandisaw 2 หลายเดือนก่อน

      How do you inject your new class or extension into their assembly? Without creating a new assembly?

  • @fleity
    @fleity 2 หลายเดือนก่อน +4

    Very useful, did this a long time ago for the mesh renderer, priceless addition.

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน

      Glad you liked it .. What functionality did you add to the mesh renderer?

  • @raymk
    @raymk 2 หลายเดือนก่อน +1

    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

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +1

      Keeping things neat and tidy is a good thing!
      Glad you liked the video.

  • @hakerlod
    @hakerlod 2 หลายเดือนก่อน +1

    Great video as always. I would love to see a context menu action that duplicates tabs, such as inspector, project, hierarchy, etc.

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +2

      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

    • @hakerlod
      @hakerlod 2 หลายเดือนก่อน +1

      Thanks for advice.

  • @gamheroes
    @gamheroes 2 หลายเดือนก่อน +2

    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

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +2

      Absolutely spot on .. it's one of the reasons I do these videos .. showing people how to save effort

    • @mandisaw
      @mandisaw 2 หลายเดือนก่อน +1

      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.

  • @mandisaw
    @mandisaw 2 หลายเดือนก่อน +1

    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" 😂

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +1

      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

    • @mandisaw
      @mandisaw 2 หลายเดือนก่อน

      @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 😮

  • @TREXYT
    @TREXYT 2 หลายเดือนก่อน +2

    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

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +1

      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

  • @danielmolineromuller166
    @danielmolineromuller166 2 หลายเดือนก่อน +1

    Good stuff! Would love to see some custom runtime-supporting editors using the UI toolkit, hardly ever seen content about it.

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +2

      Glad you liked it
      I have some UI Toolkit content lined up

  • @Shennzo
    @Shennzo 2 หลายเดือนก่อน +2

    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
      @WarpedImagination  2 หลายเดือนก่อน +2

      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

    • @Shennzo
      @Shennzo 2 หลายเดือนก่อน +1

      @@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.

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +1

      @@Shennzo glad you're enjoying them

  • @ed_halley
    @ed_halley 2 หลายเดือนก่อน +3

    I still want to see your Overlay code that implements a joystick for X/Z tilting objects.

  • @MrOmega-cz9yo
    @MrOmega-cz9yo 2 หลายเดือนก่อน +2

    "I never forced you to become a human light bulb!" 🤣

  • @valhallagalex
    @valhallagalex 2 หลายเดือนก่อน +2

    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).

  • @DaydreamStudios_Official
    @DaydreamStudios_Official 2 หลายเดือนก่อน +1

    I will definitley be making the SpriteRenderer component have an option for making drop shadows 😮

  • @karole5646
    @karole5646 2 หลายเดือนก่อน +2

    Thank you so much

  • @regys9521
    @regys9521 2 หลายเดือนก่อน +1

    Would you please teach how to use DOTS for beginners, like how to spawn prefabs?

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน

      Looking at the changes coming down the line I think I will have to have DOTS enter into some of the videos

  • @musap_
    @musap_ 2 หลายเดือนก่อน +1

    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.

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +3

      I have a dev friend and we vent whenever we go down a rabbit hole that ends with 'internal'.

  • @AlirezaTabasi7
    @AlirezaTabasi7 2 หลายเดือนก่อน +1

    Why do you think adding side components to extend its behavior is a bad idea?

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +2

      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.

  • @regys9521
    @regys9521 2 หลายเดือนก่อน +2

    Simply hilarious

  • @NathanSL11
    @NathanSL11 2 หลายเดือนก่อน +4

    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...

    • @WarpedImagination
      @WarpedImagination  2 หลายเดือนก่อน +1

      I have had that conversation a lot with other developers

    • @mandisaw
      @mandisaw 2 หลายเดือนก่อน

      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 😅