My existing code for this task is:

private VisualElement _creditSection;

    private void Start()
        var rootElement = uiDocument.rootVisualElement;
        _creditSection = rootElement.Q("CreditSection");


However, I am receiving null for this in console. I understand it's because the value is of object type, but I don't know how to get the value of the transition duration.

  • 2
    \$\begingroup\$ Hello and welcome to a StackExchange site. Just a note to let you know that when/if your question gets closed, you should edit it and work toward getting it reopened rather than deleting and creating another similar one. Please keep this in mind for your future questions :) \$\endgroup\$
    – Vaillancourt
    Feb 15 at 16:06

1 Answer 1


By chance, I discovered that I am able to get the value of transitionDuration using this code:


It seems that _creditSection.style is used for setting values, whereas resolvedStyle is used for getting values. Utilizing LINQ, we can extract the first value of transitionDuration.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .