Skip to content

UMI does not work when setting object inactive in Start() #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
trackme518 opened this issue Mar 23, 2025 · 2 comments
Open

UMI does not work when setting object inactive in Start() #129

trackme518 opened this issue Mar 23, 2025 · 2 comments

Comments

@trackme518
Copy link

I am using UMI in my project. At some place it works and other it does not. I literally copied the whole gameobject with Text input field and attached UMI script, place it higher in UI elements hierarchy and it works. While inside other element it does not work. Worse, I can not see what is the difference as inside other element it is working. I am not sure if this is some problem with some cached behavior or what gives.

In green where it works, in red where it does not. Unfortunetely I can not find a difference - ie why it behaves like this.

Image

@trackme518
Copy link
Author

I traced it down to my script attached to the container. Here is the culprit:

 public void Start(){
        //Close(); //close settings panel at the start -> this caused the UMI to NOT work
    }
  
  public void Close(){
        gameObject.SetActive(false);
}

It is very strange - when I manually mark the object in the editor not active and later open it with another button, the UMI still works. When I make the object inactive inside Start() function in the script attached to the object, it does not.

@trackme518 trackme518 changed the title Inconsistent behavior in hierarchy of the project UMI does not work when setting object inactive in Start() Mar 23, 2025
@mopsicus
Copy link
Owner

It looks like UMI starts initialization and doesn't complete it because you are disabling the component at Start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants