Designpatterns in Unity - Flyweight 03

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

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

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

    Thanks for the nice tutorials!
    One thing I've realize about SO, they do not stores changes between sessions on build. So you can't implement save/load system using them as data storage, AFAIK.

  • @gamedevSkuf
    @gamedevSkuf Год назад +3

    Excellent tutorial! I am reading a book on patterns and found your video to clarify some points on the flyweight pattern. I'm very glad I found your videos. And separately many thanks about the example with scriptable object

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

      Thanks for the great feedback. I'm glad you enjoy the videos :)

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

    I'm a little confused; the flyweight pattern isn't like anything like other patterns where you write up some code to enact a certain behaviour. Rather it's just "tweaking" a script so that all instances of an object doesn't get duplicate data in form of textures, floats, names, etc?

  • @_aibeats
    @_aibeats 6 лет назад

    I was just looking for a Flyweight pattern tutorial. Now, I want to make video games :D

    • @SqrlyCode
      @SqrlyCode  6 лет назад +1

      Happy to hear that :)

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

    i know this is a bit of an old video - do you agree that your presentation of SOs is a bit outdated here? i think it's become quite common to give SOs functionality and treat them as more than just data containers. you don't explain why giving them functionality should be avoided, and indeed i'm not sure that there is a reason. happy to be corrected!

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

      Hey Sean, I think so, that it is slightly outdated. There are some attempts to use SOs for quite a lot of things.
      The craziest thing I've seen is to use a ScriptableObject as a container for an integer so the Gamedesigner can drag it somewhere...
      However I still use them primarily as datacontainers. However you could put some functionality in them. I.e. a Weapon-ScriptableObject might contain a function to calculate the Damage per Second it deals or something like that.
      I would not put functionality in them that deals with other objects an I'm also not a fan of using them as event-relays or something like that.

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

      @@andreasmetz2438 thank you for your reply, appreciate your perspective!
      i'm sure you're aware already, but with regards to eg storing integers, the following talk is quite popular and discusses similar methods. just linking in case you're interested. ruclips.net/video/raQ3iHhE_Kk/видео.html

  • @CodyNewhouse
    @CodyNewhouse 5 лет назад

    Excellent.

  • @ADV_UA
    @ADV_UA 5 лет назад +1

    Thank u