Skip to content
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

How to detach and reattach children at runtime? #136

Open
nukedpenguin opened this issue May 31, 2022 · 0 comments
Open

How to detach and reattach children at runtime? #136

nukedpenguin opened this issue May 31, 2022 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@nukedpenguin
Copy link

nukedpenguin commented May 31, 2022

I have a few circular soft masks stacked in a hierarchy, and the lowest child is a black square, I want to detach the children to rescale parent objects and reattach to preserve the scale and position of the children. What happens is the script seems to stop rendering after I have reattached the children.

What's interesting is that I can start the game without those objects being nested, but attach the parents in the hierarchy, then it will render properly. But detaching them totally stops the rendering even after reattaching.

Is there a way to force the script to render after this?

Also, is there a way to add these soft mask scripts dynamically to new objects in the game?

EDIT: I think that instead of detaching the children, I can set the parent to an inactive dummy game object.

@nukedpenguin nukedpenguin added the question Further information is requested label May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants