private bool CanInitializeNewObject() { #if UNITY_EDITOR || !NETFX_CORE if (BoundVariableType.IsAbstract || BoundVariableType.IsInterface) #else if (BoundVariableType.GetTypeInfo().IsAbstract || BoundVariableType.GetTypeInfo().IsInterface) #endif { return(false); } if (typeof(ScriptableObject).IsAssignableFrom(BoundVariableType)) { return(true); } if (typeof(UnityEngine.Object).IsAssignableFrom(BoundVariableType)) { return(false); } if (BoundVariableType.IsArray) { return(false); } #if UNITY_EDITOR || !NETFX_CORE if (BoundVariableType.IsGenericType && BoundVariableType.GetGenericTypeDefinition() == typeof(List <>)) #else if (BoundVariableType.GetTypeInfo().IsGenericType&& BoundVariableType.GetGenericTypeDefinition() == typeof(List <>)) #endif { return(false); } return(true); }
private bool CanInitializeNewObject() { if (BoundVariableType.IsAbstract || BoundVariableType.IsInterface) { return(false); } if (typeof(ScriptableObject).IsAssignableFrom(BoundVariableType)) { return(true); } if (typeof(UnityEngine.Object).IsAssignableFrom(BoundVariableType)) { return(false); } if (BoundVariableType.IsArray) { return(false); } if (BoundVariableType.IsGenericType && BoundVariableType.GetGenericTypeDefinition() == typeof(List <>)) { return(false); } return(true); }