C# Class FullInspector.InspectedType

Mostra file Open project: jacobdufault/fullinspector Class Usage Examples

Public Methods

Method Description
Get ( Type type ) : InspectedType

Finds the associated InspectedType for the given type.

IsSerializedByFullInspector ( InspectedProperty property ) : bool

Returns true if the given property should be serialized.

This assumes that the property is r/w!

IsSerializedByUnity ( InspectedProperty property ) : bool

Returns true if the given type can be serialized by Unity. This function is conservative and may not return true if the type can be serialized by unity. However, it will *not* return true if the type cannot be serialized by unity.

ResetCacheForTesting ( ) : void

Reset the cached set of metadata. Should only be used in tests, as this will significantly impact performance.

Private Methods

Method Description
IsPrimitiveSkippedByUnity ( Type type ) : bool

Returns true if the primitive is *not* serialized by Unity

IsSimpleTypeThatUnityCanSerialize ( Type type ) : bool

A simple type is a type that is either primitive, a string, or a non-generic non-abstract class composed of other simple types.

Method Details

Get() public static method

Finds the associated InspectedType for the given type.
public static Get ( Type type ) : InspectedType
type System.Type The type to find the type metadata for.
return InspectedType

IsSerializedByFullInspector() public static method

Returns true if the given property should be serialized.
This assumes that the property is r/w!
public static IsSerializedByFullInspector ( InspectedProperty property ) : bool
property InspectedProperty
return bool

IsSerializedByUnity() public static method

Returns true if the given type can be serialized by Unity. This function is conservative and may not return true if the type can be serialized by unity. However, it will *not* return true if the type cannot be serialized by unity.
public static IsSerializedByUnity ( InspectedProperty property ) : bool
property InspectedProperty
return bool

ResetCacheForTesting() public static method

Reset the cached set of metadata. Should only be used in tests, as this will significantly impact performance.
public static ResetCacheForTesting ( ) : void
return void