Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Rendering runtime lights with ECS and HDRP

Discussion in 'Graphics for ECS' started by xytor500, Mar 6, 2023.

  1. xytor500

    xytor500

    Joined:
    Mar 29, 2017
    Posts:
    73
    I currently use RenderMeshUtility to create runtime entities that are rendered with a mesh and a material.

    Is there anything similar for lights? I don't see an IComponentData for a light, so I'm not exactly sure how to create and update lights with ECS.
     
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    There is no native IComponentData for lights. However, it is possible to attach GameObject Light components to Entities using the AddComponentObject method in EntityManager or IBaker.