Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Other IComponentData authoring code generator for ECS v1.0.0

Discussion in 'Entity Component System' started by Stefander, Feb 8, 2023.

  1. Stefander

    Stefander

    Joined:
    Nov 11, 2014
    Posts:
    41
    While testing out the new ECS package, I quickly found out that there's a lot of boilerplate code involved for authoring and baking a given IComponentData script. In order to speed up the process, I built this quick editor script. It's been pretty helpful for me so far, so to celebrate the new year I'm sharing it with you all! Don't really have the time to iterate on it anymore since I'm done tinkering around with the package, at least for now.

    5ac62c8a-3144-4e4c-bb6c-808f4af130cc.jpg

    Using it should be pretty straightforward, just add the attached script to your project, ideally somewhere in an Editor folder somewhere in Plugins so it's in a different script pass. Just rightclick on the file with IComponentData and then it should show you the option "Generate DOTS Boilerplate" at the bottom, which should generate the 2 classes necessary for authoring the IComponentData.

    All the best and hope you like it :)
     

    Attached Files: