Closed efarraro closed 5 years ago
Hi @efarraro Yes, "hierarchical effect" is one of the features to be implemented. #143 I will implement it in the near future. :)
Thanks for the quick response @mob-sakai and all your hard work on this project!
:tada: This issue has been resolved in version 4.0.0-preview.2 :tada:
The release is available on:
v4.0.0-preview.2
Your semantic-release bot :package::rocket:
HI @mob-sakai ! I tried this one after updating my manifest.json to use this version: "com.coffee.ui-effect": "https://github.com/mob-sakai/UIEffect.git#4.0.0-preview.6"
To test it, I created a 2D Unity UI canvas, then added an Image (a white square) and put a smaller child (a red square). I applied the UIDissolve behavior to the parent. The dissolve affected the parent, but did not affect the child.
Is there anything else I might be missing to have the dissolve effect dissolve the whole hierarchy? I saw your recent reboot / 4.0 version. I really appreciate your work on this library - it's one of my favorites!
@efarraro Sorry! I forgot to explain the hierarchical effects feature.
Attach a UISyncEffect component to the child object instead of a UIDissolve component.
However, this feature is experimental. In the future, UISyncEffect may be deprecated and integrated into UIDissolve (or any other effect).
Understood! I think that's OK for my purposes. Thank you so much for the response!
One more suggestion that would be nice (if it's possible!) I tried the sync effect and it works as expected. It would be useful to be able to apply to a root object that's not something like an image (for instance, just a plain game object). Something like:
GameObject -> Image -> Image
Right now, you get a popup error in the editor if you try to apply the UIDissolve to something like a plain GameObject. I got around it by just adding an Image to my root game object and disabling (unchecking) the Image script so that it didn't show up. Not sure if this is just a limitation of how the effect is applied (maybe it requires an image?), but I figured I'd mention here, just in case. Most of my hierarchies use a 'plain' GameObject as the root, and it'd be useful to be able to apply the effect to that root.
Can UIDissolve be applied to an entire hierarchy? I see that if I apply UIDissolve directly to a UGUI image, it works great.
But assume I have a parent GameObject and that GameObject has some images below it. Something like this:
If I apply UIDissolve to the GameObject, it doesn't appear to work. Instead, I need to apply UIDissolve to each Image individually. Is there any way to apply UIDissolve at the parent object and have it dissolve all the children?