[Feature Request]: Clip Panes Property on Camera Preset

zroc

Member
Would like to ask to have the clip panes property added to preset list so they can be changed on the fly with presets rather than coding all the time - better performance.

Thanks
 
You're referring to exposing Camera.nearClipPlane and Camera.farClipPlane? It's tough because I don't want to add a property to every Unity field but it should be easy to add on your end (and future proof!).

If you subclass the ViewType that you are using you can then add the property. For example:

Code:
public class MyAdventure : Adventure
{
   public float NearClipPlane{ get { m_Camera.nearClipPlane; } set { m_Camera.nearClipPlane = value; } }
   public float NearClipPlane { get { m_Camera.nearClipPlane; } set { m_Camera.farClipPlane = value; } }

   private Camera m_Camera;

   public override void Awake()
   {
      base.Awake();
      m_Camera = m_GameObject.GetComponent<Camera>();
   }
}

This will allow it to show up in the preset list.
 
Totally understand. Not a problem. I have done what you listed above in another way but it's the same result. Just trying to avoid the ever getcomponent resource intensive method as best as I can where I can - if that makes any sense.,

Thanks for response! Keep up the good work on controller and other assets.
 
Top