The light of RealityView can only be effective on virtual objects. I hope it can be projected into the real world. What API can be implemented?
Hello @lijiaxu
You are correct, virtual lights such as DirectionalLightComponent only affect virtual content. I encourage you to file an enhancement request via feedback assistant, if you would like us to consider adding that feature.
If you are building an experience where it makes sense to replace the real environment with a virtual one, based on the user's surroundings, you can use ARKit's scene reconstruction or plane detection to create a mesh (based on the user's surroundings), apply a lit material to that mesh and it would react to light. For example, you can replace the user's floor with a solid red floor using plane detection.
Finally, if you opt to use scene reconstruction and need help creating the mesh from MeshAnchor's, please let me know. I can give you a snippet to point you in the right direction.