In start method var hdAdditionalCameraData = UiCamera.GetComponent(); return always null;
I wrapped everything into Coroutine with yield WaitUntil and await when hdAdditionalCameraData will get the component. But it happens only if I select UiCamera game object in the Hierarchy.
So my question how I can modify HDAdditionalCameraData parameters through the code or create Cameras with different properties in runtime?
Can you show the entire script? When you’re creating your Camera you should save the reference into a member variable (UiCamera or something) and then just use that. If it is still null, then something is happening, but it is hard to see what based on this piece of code which does not tell anything about the actual problem.
Did you add the component HDAdditionalCameraData to the Camera?