Unity Tutorial - Custom Serialization

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 7

  • @romanvitolo93
    @romanvitolo93 Před 4 měsíci +2

    Great video as always!

  • @xuananlai8932
    @xuananlai8932 Před 4 měsíci +2

    Thank you! This is a big help

    • @IainTheIndie
      @IainTheIndie  Před 4 měsíci

      Thank you! Awesome to hear it was helpful!

  • @notlaw1567
    @notlaw1567 Před 4 měsíci +2

    Great tutorial! Quick question. In what scenarios would I want to use generics and filter just subclasses of a certain type?

    • @IainTheIndie
      @IainTheIndie  Před 4 měsíci +1

      Thankyou! So where I tend to use that is for where I want to link things by type/class rather than the direct instance. For example with the new AI Perception system I built I had a "Perceivable" class that would go on anything that could be detected. I wanted that to be able to say what sensors (vision, sight etc) it supported and allow it to be expandable.
      So that has a List to handle performing that linking. That then simplified a lot of the setup in the perception system and it meant if someone created a new class based on that they didn't need to go and update the Perceivable class or anything else, they could just write the logic for their sensor.
      Although it's a small part of it there is a tutorial on that perception system available here (it's two parts):
      Part 1 - czcams.com/video/m495YxiPJv4/video.html
      Part 2 - czcams.com/video/-5YJp8AA2Go/video.html

    • @notlaw1567
      @notlaw1567 Před 4 měsíci +1

      @@IainTheIndie Ooh I see. Rather useful in those cases, but I assume in case I don't need to filter subclasses I can either set the generic to UnityEngine.Object or simply do the same but without generics at all. Thank you!