public static BoundAccessExpression BindPropertyAccess(AbstractPhaseContext context, SyntaxNode node, PropertySymbol propertySymbol, BoundExpression sourceExpression, BoundExpression[] parameterExpressions = null) { if (propertySymbol is ExternPropertySymbol externProperty) { Type propertyType = externProperty.ContainingType.UdonType.SystemType; if (_allowedConstantPropertyTypes.Contains(propertyType)) { PropertyInfo property = propertyType.GetProperty(externProperty.Name, BindingFlags.Static | BindingFlags.Public); if (property != null) { return(new BoundConstantExpression(property.GetValue(null), propertySymbol.Type)); } } if (propertySymbol.ToString() == "UnityEngine.Behaviour.enabled") { return(new BoundEnabledPropertyExternAccessExpression(context, node, sourceExpression)); } if (propertySymbol.ContainingType.ToString() == "TMPro.TMP_Text") { return(new BoundTMPPropertyExternAccessExpression(context, node, externProperty, sourceExpression)); } return(new BoundExternPropertyAccessExpression(context, node, externProperty, sourceExpression, parameterExpressions)); } return(new BoundUserPropertyAccessExpression(context, node, propertySymbol, sourceExpression, parameterExpressions)); }