Search Unity

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

Feedback Access to Current SpriteState

Discussion in 'Documentation' started by Kagenokami, Apr 30, 2023.

  1. Kagenokami

    Kagenokami

    Joined:
    Apr 30, 2023
    Posts:
    1
    My request is very simple, so much so that I cannot figure out why it doesn't exist and there are no workarounds to be found.

    I want to be able to read what spriteState is presently in use so that I can make decisions accordingly.

    I ran into this because, due to single graphic limitations on buttons, I had to separate my button's frame into a separate object. I want to edit this frame to match with the current states of the button, which requires me to be able to determine the presently active state.

    I attempted to add this functionality myself, but with how tightly the related code is protected, I cannot. All it needs to do is update a string property that can be access with a ToString or similar call so we can have access to the present state...