Search Unity

Question How to use a string as the override name in TryGet() ?

Discussion in 'Universal Render Pipeline' started by edd95al, Feb 24, 2023.

  1. edd95al

    edd95al

    Joined:
    Sep 15, 2022
    Posts:
    2
    Hello. I'm working on a component that allows you to set custom volume overrides on a volume profile (using URP post processing), but sadly I'm having a lot of trouble cause I need to use TryGet<>() but passing a string as the override class name that goes inside <>

    This is what I want to achieve.

    volumeProfile.TryGet<myString>(out _myString);

    Where myString refers to the override I want to get.