找到相机组件直接.是没用的,只能修改Projection里的属性
要想该Rendering下的属性,需要这样
Camera cam = camera001.GetComponent<Camera>();
//改Projection
cam.nearClipPlane = 0.1f;
cam.farClipPlane = 200f;
cam.allowMSAA = true;
//改Rendering
UniversalAdditionalCameraData additionalCameraData = cam.GetUniversalAdditionalCameraData();
additionalCameraData.renderPostProcessing = true;//开启后处理
additionalCameraData.antialiasing = AntialiasingMode.SubpixelMorphologicalAntiAliasing;//启用抗锯齿