BringAtomToFront

Plugins + Scripts BringAtomToFront

Download [<1 MB]
This is a plugin that is intended to bring UI atoms to the front of all 3D objects automatically. Meaning the UI items will appear in front of all Game objects like Persons, CUAs, Floors/Walls, etc.


USAGE:
Simply add this as a plugin to atoms. It is intentionally written to:
- Add to Atoms like UISlider or UIButton.
- Or even can add to a Subscene who is Parenting a collection of Atoms.


HOW IT WORKS
It is a very short simple plugin now. But figuring out what exactly to change in order to get this functionality was quite tricky. My use case originally was building a custom menu that contained a UISlider that tracked the Head. However, the UI Slider would always halfway appear behind Objects and Persons in the game world. Trying to change order of Render queue or Render types did not work. It turns out these UI elements have their own built in Canvas that places them in the 3D world. So all this code does is replace the Atom's Canvas material with a Default Shader that will make the Atom appear in front of all world objects! Then finally added toggle functionality to revert the atom's canvas back to its original shader if needed.


CONCLUSION
Feel free to use the plugin or code in your own creations.

I would very much appreciate any acknowledgement if you reuse code logic or repackage this functionality. This is my very first plugin so inform me of any issues and thanks for checking it out!
Images and attachments
  • Before-BrintToFront.png
    Before-BrintToFront.png
    266.1 KB · Views: 0
  • After-BringToFront.png
    After-BringToFront.png
    242.3 KB · Views: 0
React to this content...

Share this resource

Back
Top Bottom