I have a scene with frustum culling set on the camera. If I create a UI element in the editor it is always displayed ( the yellow cog ). However, if I create a similar UI element in code ( the white cog) then the element will appear and disappear as I move the camera around with the 3 person controller. If I disable frustum culling then this issue doesn’t happen. There is probably something wrong in my code or setup but I can’t see it. Any ideas? Below is the test app. The app starts with the white cog not being shown. Move the camera around 360 and the white cog will appear.
https://playcanvas.com/project/913583/overview/culluitest
https://playcanvas.com/editor/scene/1391812
https://playcanvas.com/editor/code/913583?tabs=78008457