Search Unity

reflecting over game objects finds deprecated properties

Discussion in 'Scripting' started by holyjewsus, Mar 7, 2015.

  1. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    For instance, when I reflect over a cube I find a the rigid body property which has been deprecated, attempting to retrieve the value of the property via reflection results in:

    NotSupportedException: rigidbody property has been deprecated

    Why am I finding this property via reflection, is there a specific binding flag I can invoke to avoid returning deprecated properties?
     
  2. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    Last edited: Apr 20, 2015
  3. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
  4. holyjewsus

    holyjewsus

    Joined:
    Mar 7, 2011
    Posts:
    624
    hey thanks!