validateExternalBindings method

void validateExternalBindings()
Check that all EXTERNAL ink functions have a valid bound C# function. Note that this is automatically called on the first call to Continue().

Implementation

void validateExternalBindings() {
  var missingExternals = HashSet<String>();

  _validateExternalBindings(_mainContentContainer, missingExternals);
  _hasValidatedExternals = true;

  // No problem! Validation complete
  if (missingExternals.isEmpty) {
    _hasValidatedExternals = true;
  }

  // Error for all missing externals
  else {
    var message =
        "ERROR: Missing function binding for external${missingExternals.length > 1 ? "s" : ''}: '${missingExternals..toList().join(', ')}' ${allowExternalFunctionFallbacks ? ", and no fallback ink function found." : " (ink fallbacks disabled)"}";

    error(message);
  }
}