Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to re-assign the RenderTexture

Discussion in 'Graphics for ECS' started by Aditrc, Jun 14, 2023.

  1. Aditrc

    Aditrc

    Joined:
    Dec 15, 2018
    Posts:
    15
  2. mingwai

    mingwai

    Small Graphics Potato Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    52
    Hi, attached an example (ReassignRTtoSubscene.zip) on how to do that.
    The idea is to have a component outside the subscene that holds the original RenderTexture asset reference, and then using an ECS system script to re-assign this RenderTexture asset reference to the material that the entity (object in subscene) uses.
     

    Attached Files: