Getting Started with Editor Scripting in Unity! | Tutorial

Поделиться
HTML-код
  • Опубликовано: 15 дек 2024

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

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

    Editor scripting is essential. Not only does it save you time as a developer, but it can make your tools much easier to work with to empower your designers to make what the want to, rather than fighting with your tools to make something that kinda works.

    • @InfallibleCode
      @InfallibleCode 4 года назад +18

      Tooling is an essential part of game development that definitely needs more attention. I'm so happy to see that @Unity is improving their support for custom editors!

    • @CodingWithUnity
      @CodingWithUnity 4 года назад +4

      The time it takes to write an editor script will save you 10x that amount of time later.

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

      Editor scripting can also be crazy fun, and often for me at least, when I create something super useful, it ends up saving more time than I ever though possible.

  • @Brandon-th9pi
    @Brandon-th9pi 4 года назад +9

    As a full time web dev these features will be very easy to implement for me, but for others that aren’t used to this type of development, it could have a big learning curve.

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

      Really? Because its the "web like" functionality thats the easy part.

    • @Brandon-th9pi
      @Brandon-th9pi 4 года назад

      @@johnhio1843 potentially, yeah. I know backend devs that struggle with simple front end stuff.

  • @awesomedata8973
    @awesomedata8973 4 года назад +153

    Sadly, she spends more time talking about how "great and scalable" this system is and "what people can do with it" -- instead of actually showing **how** to _do_ anything with it....
    This video spends more time *staring* at scary code and unfamiliar concepts rather than actually **explaining** the unfamiliar concepts/code to those who might want to understand it better to ease their fears for real. A calm, reassuring tone to tell the user "look at all the cool stuff I can do! -- It's going to be just fine! You can just dive right in with ZERO knowledge!" --- is not enough to ease their fears. Editor scripting is an essential skill -- but a beginner looking at all of that code with no idea WTF is going on is going to have _nightmares_ after this video. :/

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

      This is par for the course with Unity's videos.

    • @tacman1123
      @tacman1123 4 года назад +2

      There's a learning curve to the new system, BUT it will be usable in both the Editor and Runtime. This alone justifies the extra work. But it really is also much more powerful, and will be the basis of localized UI, easier dynamic UI's, etc.

    • @awesomedata8973
      @awesomedata8973 4 года назад +8

      @@tacman1123 The "extra work" is still a bit of a problem, but it actually isn't what I'm referring to here. I agree with you that it is "worth" the effort -- but that still doesn't have anything to do with (much less justify) the broken approach underlying this video's content. :(

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

      I agree. They need a better teacher. And remove the word tutorial in this video.

    • @jiaxuanng2396
      @jiaxuanng2396 3 года назад +5

      She doesn't actually know anything and is paid to read off a script.

  • @DrFizzyQuizzler
    @DrFizzyQuizzler 4 года назад +2

    I do find it truly wonderful that even the unity videos as showing vs code as the editor.

  • @kinguitar1987
    @kinguitar1987 4 года назад +45

    It seems a lot of work to do something simple. I know that now we have more control, but it should have shortcuts, do not forget the principle of fast iteration.

    • @awesomedata8973
      @awesomedata8973 4 года назад +13

      This is the one thing Unity forgets above all others. D:

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

      It isn't that much work if you're thinking of how much more control you have over your scripts. It wasn't just a window created, but also a property drawer, style sheet etc. You could make it easier by remove the readonly and therefore remove the property drawer, but then you might accedentally change that variable. Style sheets can also be created without scripting.

    • @awesomedata8973
      @awesomedata8973 4 года назад +14

      @@J3NKA I think the problem isn't as much how much more _work_ as it is how much more _boilerplate_ that is required to create a simple (clickable) button, for example. People have been complaining about this since UIElements was conceived, but nobody listened. :/

    • @TheMalliniak
      @TheMalliniak 4 года назад +2

      If you are considering building custom editors and automations to something you want to iterate fast - that’s a bad approach. Custom editors are for designers who creates content to a game that has been already iterated :) in bigger projects this is crucial. No one cares about editors and fun stuff like this while prototyping and iterating.

    • @__dane__
      @__dane__ 4 года назад +4

      @@TheMalliniak I found this same frustration - I just wanted to change a field to a property drawer that would return shader property references including "placeholdertext" in it's name. It is just so much boilerplate work. I just want to change one field - I had to get one of my friends who makes editor tools to handle it

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

    This new editor workflow has sped up my editor scripting time by 30% and made the editor styles muuuch more readable and reusable! Love it 😘

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

    Oh man I never goof with the Editor script. So much to learn.

  • @DrBlort
    @DrBlort 4 года назад +14

    A boilerplate creation functionality would be nice, maybe something that uses reflection to gather the information we need by default, and then being able to modify that. Maybe even with a visual editor.

    • @mindstyler
      @mindstyler 4 года назад +10

      There is UIBuilder you can use to get an immediate visual representation and element drag 'n drop support. With it you can easily build your uxml files and uss stylesheets. It comes natively with UIElements. I don't know why they didn't show the most important tool of this package.

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

      @@mindstyler Ah, good to know! Thank you!

  • @Cellfan
    @Cellfan 4 года назад +9

    Sadly, the Scripts are not in the Unity Royale Project to download :( So much for research

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

      Gotta type out everything in the video... ugh

  • @gary-huang
    @gary-huang 4 года назад +5

    These videos are great! Fantastic explanation, editing, content, and conciseness. Glad to see more and more high quality official tutorials from Unity!

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

    Good info in here once you know some basics already

  • @omegablender
    @omegablender 4 года назад +37

    i'm not skilled enough to use this but NICE

    • @rod-abreu
      @rod-abreu 4 года назад +5

      Don't you already know how to read and write? So yes, you're skilled enough ;) it's just a matter of time and
      willpower, that's all you need.

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

      Yea you are.

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

    can we use intellij for editor for scripting or untity just using visual studio code for the editor

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

    Where can I find out what the CardData class looks like, used in this statement "FindAllCards(out CardData[] cards);"

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

    Where can I learn about this comprehensively? Is there a book or some resource that goes over it in more detail?

  • @lvx969
    @lvx969 4 года назад +42

    I feel even more confused after watching this. This literally *teaches* nothing about the system. Not a single thing was explained, your just stepping through a mountain of code and reading it out loud like it's supposed to make sense lol.

    • @proportion11
      @proportion11 4 года назад +8

      I totally agree. a tutorial starts with saying what your doing, then doing it. i have no idea what the disable float attribute class is even attached to let alone how it works with a custom property drawer. why she is making cards, without explaining in the video what the cards are for in game and how they are used. Nobody learned from watching this video.

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

      Literally I learnt nothing

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

      Combine this with the fact that we have both the UI Toolkit and older UI Window generation that don't completely like each other and it becomes clear that they forgot the point of the whole Editor UI creation was to make things easier on us.

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

    Maybe I skipped over it but I dont remember seeing them showing the definition of CardData.cs anywhere....

  • @Oxmond
    @Oxmond 4 года назад +2

    UI Style sheets is a great idea 👍🤓

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

    Excuse me, but do you know in which part of the scripts is the way to make the striped area to indicate that you can't put anything towards the opponent (0:12)?

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

    Very good tutorial

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

    In the custom property drawer onGui, how do we know it's actually a float? How can there be a floatValue property in the SerializedProperty class?

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

      If the property doesn't have a floatvalue it simply wont draw and you'll see an empty line in your inspector

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

      @@Terror1046 Strange...

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

      In almost all cases, you'll want to use EditorGui.PropertyField instead.
      Just pass in the SerializedProperty reference into the method and it will automatically draw the field with the correct data-type.

  • @laniakeadev.2271
    @laniakeadev.2271 4 года назад +3

    What abou fixing the 2D URP tons of bugs?

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

    Hi - is the old Ui Canvas Creation going to be replaced by this new Ui Builder Tool Kit System? I looked through it and they seem completly different - ui build seems to be the cavas system for Tooling/making editors...and the uicanvas is for scene content. Are you guys planning on removing UI canvas?

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

    This is veri good but, There are simple videos everywhere. The proper training video is nowhere to be found. Especially regarding the editor. So how we can make this editor ??????????

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

    Looks great guys. Cheers

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

    when imgui will be obsolete?

  • @noodle-eater
    @noodle-eater 4 года назад

    Cool cant wait to try that

  • @TheGuayeah
    @TheGuayeah 4 года назад +2

    It would be great if we could use this tool to make our WebGL page where the build will run!

  • @CannabisTechLife
    @CannabisTechLife 2 года назад +4

    Finally figured it out. For anyone trying to follow this BS of a "tutorial' and are using the UI Builder (Unity's own tool...)
    You can't out of the box apply an image to your UI document because the UI Builder doesn't include any type for an image. You CAN however apply an image to a VisualElement ONCE YOU INSTALL com.unity.2d.sprite.
    THEN in your script. make a variable for your visual element
    var previewImage = rootVisualElement.Query("previewImage").First();
    And then use style.backgroundImage to apply a sprite instead of a texture.
    previewImage.style.backgroundImage = new StyleBackground(sprite);
    Crazy how this took half a day to figure out from following random tutorials and googling vs Unity's own help...

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

      Not only that but now I updated to most recent LTS version, and unity literally destroyed all arrays/lists on Window editor.
      Now I can't edit, set styles or sizes of the arrays. I've searched like crazy on google and found no solution. Only a "work around" which its explained but with no actual solution. Like not even a code example or anything. They did something to ListView and
      ScrollView that it doesn't works like before.
      It took me 2 weeks designing and organizing the data structure, just for unity to mess up the UI.
      If you are wondering, grab the project of the video, and open it with the newest LTS version 2022.3.7f1
      and then open the window they created. You will notice that any array is compressed into a non working size.
      I've spent too much time trying to find a workaround and nothing. I had to give up.
      I had to update because there were a couple of bugs on the engine that were messing my game that I had no control of, and as soon as I update to the recent version it messes my UI.
      I even went back to 2022.3.4f1 LTS and still the UI problem persists...

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

    Is it possible to make a game and just using unity's particle system?

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

    Welp, guess it's time to make that editor scripting series I've been wanting to for a while. UIElements has matured quite a bit.

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

    This is great, I can't wait until this is more widely adopted. Minor point on the video: Don't read the titles, just display them (so it's easy to find when navigating) and start speaking with the first talking point. There's no value in reading a title to us, it adds a delay that distracts from the flow.

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

      I agree that there's little or no value in reading the titles for somebody who's actively watching the screen, able to give it their full attention, and good at visual processing. It sounds like you're one of those people (and that's good!) but not everybody is.
      I have kids, so any time I get to watch videos like these is probably at the end of a long day while I'm cooking or doing chores or whatever. Reading the titles is valuable in those circumstances.

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

    *I can't believe they implemented Unity bolt but there is no single document on internet about Editor scripting using bolt.* How can u release a software update without any documentation about its use.*

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

      You're not supposed to use Bolt to script the editor.

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

      @@TedThomasTT maybe it's not possible thats why😂 i found editor nodes in bolt but I can't make any window for editor.

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

    Love your videos

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

    can anyone help me i want to be a game designer but i don't know any thing

  • @fuzzy-02
    @fuzzy-02 4 года назад

    Not a clash royale clone😂😂😂very nice video!

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

    Dror or draw-er?

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

    where source code?

    • @로펠
      @로펠 2 года назад +1

      you need typo script reference by in video

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

    Please zoom in when you explain the code.
    Anyway, thanks for the informations.

  • @andreisava1691
    @andreisava1691 4 года назад +2

    So we will assume I know what all these drawers are even though I am learning Unity for the first time... Not the best made tutorial

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

  • @IronFreee
    @IronFreee 4 года назад +9

    It's so annoying to loose time making custom editors when the main project code can constantly change . Nobody cares if it looks good, it should be super fast to create and maintain. Why not expand your brackets system to choose how to display the data in the inspector? Who want to spend more time creating tools than working on the project?

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

      Well to be honest a lot of people enjoy making tools over games.

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

      ​@@__________________________4597 How is that pertinent? So people should only use Unity to make tools, not games? What are those tools for?

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

      @@IronFreee Those tools are for making other tools. See, with Unity, you make tools to make tools. You never actually get to the part that lets you make games. Mostly because the default tools are simply not sufficient. Therefore, it is a legit path in Unity to only make tools and never games. This is why the Asset Store exists. :/

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

      @@awesomedata8973 Yes, I agree about the default tools being really bad because of a lack of consistency and updates from the clowns who work there...
      But how adding more bad stuff will help to work quicker?
      I'm not interested in loosing time to fight against Unity poor design choices. They already have 2 UI systems and a bracket logic to display data. Why do they keep adding other incoherent systems?

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

    Python script ?

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

    There's not enough documentation!!! Especially stuff like graphview.

  • @MagicxReal-Studio
    @MagicxReal-Studio 3 года назад +3

    so this isn't a tutorial or a class is just a "show off our product" kind of thing...useless but hey good job on it
    change the title tho this isnt getting started in anything is just a presentation ..clickbait

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

    The Brazilian

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

    Anyone in the comment pls reply I want to team up on my game pls reply is u r noob or berely skilled

  • @user-wo3ym4bj8e
    @user-wo3ym4bj8e 2 года назад +1

    Hey Unity ... I am very dissapointed that there is no help on explaining step by step how the managers, scripts, connections on the demo you made .... maybe you put some effort into it and then more people will follow / use it ...

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

      also this thing is partially outdated!

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

    no scripting tutorial is complete with earrape ncs music

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

    far too complicated, and splitting one script into style sheet and c# code is nonsense
    there is another way to define style within c#, talk about this so we don't have a gazillion files trashing our project structure, database v2 struggles enough...

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

    Kinda worthless tutorial, just goes straight in without any foundation.

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

    ngl i found this 'tutorial' extremely confusing and hard to follow, i'm a beginner trying to learn and there's just so much code that she's blasting on screen, show me the process and guide me lol, maybe this is for people who already have a deep understanding of programming but this definitely isn't it for those starting out.

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

    Clash Royale lol

  • @stefan429
    @stefan429 4 года назад +2

    im early?? :o

  • @Tigrester_gaming
    @Tigrester_gaming 4 года назад +2

    First

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

      No 2 seconds later than another dude

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

    no english

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

    Just buy odin inspector

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

    why is the voice so sexy?

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

    I’m early as well?! :O

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

    I'm 3rd

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

    I want C++ Support .c

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

    Really?! Your source folder on Github doesn't even have the freaking editor script you go through here? FFS.

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

    so, not really relevant, but does it bug anyone else that she saws drawer like the thing in your kitchen cabinets, rather than draw-er as in, the thing that draws the thing?

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

    aaand odin editor goes to trash

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

    your engine is so unstable and fragile and now you want us to script the editor as well? ...

    • @mindstyler
      @mindstyler 4 года назад +2

      First, if you need production-ready stability then use LTS versions. Second, you are not scripting on the engine and modifying it, you are only altering the visual interface you use to manage certain assets so your designers have an easier time maintaining and adding content to your game.

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)

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

    Hey unity, could you do a tutorial on 3d platformer movement? I want to make a 3d platformer with movement similar to a hat in time or mario odyssey. (Not a puzzle platformer)