Search Unity

Feature Request API: How to detect whether a managed type is an interface?

Discussion in 'Profiler Previews' started by Peter77, Jan 9, 2019.

  1. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,029
    How would I detect if a managed type is an interface? The TypeDescription class does not seem to provide this information.

    For example, how to tell that UnityEngine.IExposedPropertyTable is an interface, using the data in a memory snapshot?
     
  2. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    19
    Hi Peter,

    Currently we do not store that specific information in the snapshot, we plan to in the future as we should be able to extract it from the scripting back-end.

    Cheers,
    Alex
     
  3. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,029
    OK cool, thanks for the info!