Making Your Own Unity Tools - Introduction to Custom Editor Windows - Unity Tutorial

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • Download the project files from this video - tmg.dev/CustomEditorBasics
    🎮 Let me know what other Unity tutorials you want to see 🎮
    👇 See below for time stamps 👇
    0:00 - Introduction
    2:00 - Project overview and tool demonstration
    6:42 - Important note about the 'Editor' folder
    7:40 - Overview of the C# script
    8:38 - Opening the custom editor window
    9:25 - Adding the editor window to the menu bar in Unity
    10:13 - GUI Layout Label
    10:40 - Editor GUI Layout Text Field
    11:12 - Editor GUI Layout Int Field
    11:28 - Editor GUI Layout Slider
    12:01 - Editor GUI Layout Float Field
    12:12 - Editor GUI Layout Object Field
    13:04 - GUI Layout Button
    13:27 - Spawning the Object
    13:44 - Wrap up and final demonstration
    Resources:
    Unity EditorGUILayout documentation: docs.unity3d.com/ScriptRefere...
    Please 'Like' this video and share it with anyone who is interested in video game development.
    Subscribe to the channel for much more independent video game developer related content including tutorials, design breakdowns, industry events, VLOGs, and much more fun stuff!
    Links:
    Blog:
    turbomakesgames.com
    My Game Development Studio's Website:
    homecookedgames.com
    My GitHub:
    github.com/JohnnyTurbo
    Music by: Joakim Karud / joakimkarud
    My Setup:
    Camera - Yi Action Cam - amzn.to/2FSRxLk
    Webcam - Logitech C922x Pro - amzn.to/2HTinFp
    27" 4K Monitor - Asus PG27AQ - amzn.to/2Mkg7X2
    Laptop - Asus GL502VS - amzn.to/2FNKiET
    Keyboard - Das Keyboard 4 Ultimate - amzn.to/2W7SHZd
    Other Keyboard - Ducky One 2 Mini - bit.ly/2I8ivQI
    Headset - PlayStation Platinum Wireless Headset - amzn.to/2FR6n58
    As an Amazon Associate I earn from qualifying purchases.
    #CustomEditorWindow #UnityTutorials #GameToolsProgramming
  • ИгрыИгры

Комментарии • 66

  • @masripaul
    @masripaul 3 года назад +20

    This is one of the best tutorials I've seen on anything Unity, let alone something as daunting as custom editors. Great delivery style and really well put together example. Thank you!

    • @TurboMakesGames
      @TurboMakesGames  3 года назад +3

      So glad to hear this, really appreciate the positive feedback!

    • @jaxshane6746
      @jaxshane6746 2 года назад

      I guess I am quite randomly asking but do anyone know of a good site to stream newly released tv shows online?

    • @maximilianoaarav2178
      @maximilianoaarav2178 2 года назад

      @Jax Shane Flixportal =)

    • @jaxshane6746
      @jaxshane6746 2 года назад

      @Maximiliano Aarav Thanks, signed up and it seems like they got a lot of movies there :) I appreciate it !!

    • @maximilianoaarav2178
      @maximilianoaarav2178 2 года назад

      @Jax Shane you are welcome xD

  • @Caden_Burleson
    @Caden_Burleson 3 года назад +3

    Thank you! Perfect tutorial and example for a intro on editor scripting. Loved the object spawner example because it's a good start for what I'm trying to do already. :D

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      Great to hear! Editor tooling is a really important skill to have. Have fun creating more tools 😀

  • @StarGazerTom1991
    @StarGazerTom1991 2 года назад +3

    This is a great example for creating editor tools, many thanks! Just what I needed!

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Wonderful, glad to hear this was helpful to you 😀

  • @LyonLoi
    @LyonLoi 4 года назад +1

    Very clear and useful tutorial. Thanks for the good work!

  • @JPlokford
    @JPlokford 3 года назад +4

    So much clearer than the official unity tutorial.

  • @timithius7885
    @timithius7885 11 месяцев назад +1

    Absolutely fantastic tutorial, simple, focused and incredibly useful! Thanks!
    (4 years ago, where was I? Not where I should have been!)

    • @TurboMakesGames
      @TurboMakesGames  11 месяцев назад

      Haha so glad to hear it still holds up 😊

  • @floriankomposch3119
    @floriankomposch3119 3 года назад +1

    Your solution works better and with less bugs than , PolyBrush or terrain(paint details) , thx for the introduction to unity editors

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      Good to hear. Have fun creating more of them!

  • @josepaulofernandes4052
    @josepaulofernandes4052 3 года назад +1

    this video is a great service for the community

  • @neverstepd7
    @neverstepd7 Год назад

    Thank you! I tried myself and I made an automatic hierarchy organizer this is useful

  • @pol3824
    @pol3824 Год назад

    Amazing, thank you!

  • @chrisxxx4714
    @chrisxxx4714 3 года назад +6

    i would love a complete tutorial series about custom tool creation for a bunch of different situations!

  • @BrokeGamedev
    @BrokeGamedev 4 года назад

    Cool stuff, kudos to you!

  • @arcader9184
    @arcader9184 3 года назад +3

    Thanks for the tutorial, I'm gonna make a tool for everything.

    • @TurboMakesGames
      @TurboMakesGames  3 года назад +1

      Once you make your first one, they get addicting and you make them for everything 😁😂

  • @damegamisama
    @damegamisama 2 года назад +1

    Great tutorial! Thank u a lot!

  • @RickardApps
    @RickardApps Год назад +2

    Very cool and helpful

  • @puripuripupuripu2987
    @puripuripupuripu2987 3 года назад +1

    Thank you, dude!

  • @alekseiborovkov5741
    @alekseiborovkov5741 4 года назад +5

    Thank U, man!

  • @AschKris
    @AschKris 2 года назад

    Very good video!

  • @weightednormal3682
    @weightednormal3682 2 года назад +1

    Excellent example.

  • @intimidate2161
    @intimidate2161 2 года назад +2

    Great Tutorial. I took it one step further and added "Terrain.activeTerrain.SampleHeight", so the objects are at the correct terrain height.

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Awesome! Glad to hear you were able to customize this further to fit your needs

  • @raymondlin642
    @raymondlin642 3 года назад +2

    Awesome Tutorial! First time doing editor scripting and it was easy to follow. One note though, isn't this the older IMGUI system? It would be great if you could make a tutorial on the UI Toolkit which is new and much easier to use. Thanks!

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      Thanks! The IMGUI system has been around since the beginning of Unity and it still works well for simple things. The UI Toolkit is still in preview form right now, but it will be cool see how well it works with custom tools like this.

  • @manuelglez9347
    @manuelglez9347 29 дней назад

    10/10

  • @andy_7_744
    @andy_7_744 4 года назад

    Man,i open a new scene and i dont have setting to create game,plz help me

  • @fukukyun78
    @fukukyun78 2 года назад +1

    Is there a way to make it spawn with a ray cast? For example, you can turn spawning on or off with a bool, and wherever you click, it casts a ray and spawns the object there?

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Yes there is. In fact, my friend Dave just put up an awesome video that shows you how to do just that: ruclips.net/video/k-LbV_zMeI4/видео.html

  • @MrEggplantation
    @MrEggplantation 3 года назад

    Hey this is great! I'm really struggling with the advanced features of Editor Windows, would love some help, or a tutorial that goes a bit beyond this. Specifically I want to change characteristics of a GUILayout element after I create it. How can I update the colour of a label or button after I have clicked something in my editor window?

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      The OnGUI function is essentially a draw call that is ran every frame. So when the user clicks a button, this could set a flag and in your OnGUI, check that flag and set the color depending on the value. Hope that helps!

    • @MrEggplantation
      @MrEggplantation 3 года назад

      @@TurboMakesGames Thanks for the reply! Yeah that makes sense. I've since learnt that OnGUI draws UI in a completely diffferent way to how you think about objects in your scenes in Unity. OnGUI doesn't make persistent objects that you can alter later, so any changes to the UI element has to be done before the element is drawn.

  • @XPaveway
    @XPaveway 3 года назад +1

    hey I am working on something similiar to this is there any way to select a specific position in the scene before spawning stuff?

    • @TurboMakesGames
      @TurboMakesGames  3 года назад

      Great to hear! One approach you could do is have an empty GameObject with a gizmo on it, so you can see it in the editor, then move it around to where you like, then when you spawn your GameObject just get the transform position of that empty object. Hope that helps!

    • @XPaveway
      @XPaveway 3 года назад

      @@TurboMakesGames Okay that makes sense. I am doing something similar. Would have been nice if you could make a right click menu or something that would capture the mouse position in the editor window.

  • @IdontWatchIsee
    @IdontWatchIsee 3 года назад +1

    Hi guys, i am interested in finding projects to work on, games, little games, for collaboration with other people that want to create games, on the side from work. Does anyone have any idea where to find something like that?

    • @TurboMakesGames
      @TurboMakesGames  3 года назад +1

      Unity is launching a new open source project platform. Contributing to that and getting yourself known there would be a great place to start. I'll have a video coming out later this week with more info...

  • @phyzxengrmoore6928
    @phyzxengrmoore6928 2 года назад +1

    I have an object generator script that I have to play to produce GOs. I made it this to test it out. Now that it works I need to convert it to the editor window because I want the GOs and not in play.
    The methods that I have I want to keep as a playable script and use in and editor extension. This looks like a special kind of maintenance to configure. I have Update() and Start() utilized. The classname : Editor and classname : Monobehaviour will cause a differentiation build. I believe I need a script reference in the Editor class to access the MonoBehaviour methods. Not sure how to write the reference line.
    I hope I am clear here. Thanks for this video!

    • @TurboMakesGames
      @TurboMakesGames  2 года назад

      Thinking your best option would be to move your custom methods to a static C# class that doesn't inherit from anything. That way you could call these methods from both the Editor and MonoBehaviour scripts. Hope that helps!

    • @phyzxengrmoore6928
      @phyzxengrmoore6928 2 года назад +1

      @@TurboMakesGames Yes. I came to that realization of the EditorWindow and MonoBehaviour can not talk to each other. Took a while after twisting around in my head. I want to make the methods class a communal DLL. This is what kept me asking how can I achieve this. You hit the nail on the head. Thanks. And oh the DLL goes into managed assemblies library.

  • @subhroneelbhattacharya321
    @subhroneelbhattacharya321 Год назад

    Is it possible to include the editor window in the build ? LIke what if I want to handle the spawning in the runtime using the editor window ?

    • @TurboMakesGames
      @TurboMakesGames  Год назад +1

      Unfortunately not, anything in the Editor folders are not included in builds. What you could do is extract out the logic in your editor window into a regular C# class file, then call those methods from your editor window. This would allow you to create a runtime UI where you could call those same methods. Hope that helps!

  • @vs_3080
    @vs_3080 4 года назад +1

    Im unable to create a gameobject field at the beginning, and it is not working with objectfield.

    • @TurboMakesGames
      @TurboMakesGames  4 года назад

      Why not? Is it giving you an error, or is it just not showing up? Do other types of fields (i.e. text field) work?

    • @vs_3080
      @vs_3080 4 года назад +1

      @@TurboMakesGames Now it's Working!, i'm an intermediate unity developer and started editor coding recently so, there was an issue with visual studio, Fixed it!.👍

  • @suprojitdey7946
    @suprojitdey7946 3 года назад

    Can you please guide me how can I access the Sprite Editor within Sprite Renderer? I actually want to add Normal Maps as Secondary Textures of different sprites using an automated tool like this.

  • @ASMRwithBESTIEEEEE
    @ASMRwithBESTIEEEEE 2 года назад

    Hey what’s your doing