Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question How can I apply 2d animation in ECS/DOTS

Discussion in 'DOTS Animation' started by iamshenkui_gee, Jul 20, 2022.

  1. iamshenkui_gee

    iamshenkui_gee

    Joined:
    Apr 24, 2021
    Posts:
    30
    I made some images for my 2d animation. But I am not sure how I use them in the DOTS/ECS system? Does anyone have an example?
     
  2. DV_Gen

    DV_Gen

    Joined:
    May 22, 2021
    Posts:
    14
    I've done some tests with this, though I haven't made anything formal.
    https://twitter.com/_DV_Gen_/status/1442501356908990465?s=20&t=j-omlNx7_b3C-gY5F8MIfw
    The idea is to keep all animation frames in the same texture, and animate though them using the flip book node, or similar method. The frame can be selected using a material property override. I just did a simple proof of concept test, but the idea could be elaborated on for a full 2D animation system.
     
  3. iamshenkui_gee

    iamshenkui_gee

    Joined:
    Apr 24, 2021
    Posts:
    30
    Yeah, using flipbook in shader graph is the final method I use to create some materials for the animation. and use graphics.drawMesh to create the animation, which works well.