Move UI with / corresponding Game Object?
I am making a game pretty much like templerun, but I want some enemys to prompt a UI symbol when they're within a given range. Since it's an on-rail running game the ui should move with the characters!
It's the last step for the gameplay for our 2nd project so I am doing well as a hobby coder, but I really can't imagine any solution since I can't just child the UI-object to the enemy.
So any suggestions for approaches and solutions are welcome! I will write mine in the comments. Oh and also I prefer C# for games.
Thanks in advance,
KayB14
Answer by ElectricMonk · Aug 12, 2016 at 03:33 PM
If you set the UI Canvas -> RenderMode to World space you can just parent the UI Elements to game world objects.
Check out the docs for more details! https://docs.unity3d.com/Manual/UICanvas.html