Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

FindRelativeProperty custom class

Discussion in 'Scripting' started by yumupdate, Jul 20, 2013.

  1. yumupdate

    yumupdate

    Joined:
    Nov 20, 2012
    Posts:
    29
    SerializableProperty's FindRelativeProperty is working fine for one property in my script that is a MonoScript but my custom class (which is a public property in the same object) isn't being picked up by it. Is there a requirement for the function to be able to pick up these properties? The custom class is Serializable and if I change it to inherit from anything, none of the properties are available to FindRelativeProperty.

    Thanks!
     
  2. yumupdate

    yumupdate

    Joined:
    Nov 20, 2012
    Posts:
    29
    It seems that if you're trying to find a field of an object that is the same type as that object, it doesn't like that. I separated that piece of functionality out to another custom class and it works now.
     
unityunity