Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

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!
     
unityunity