When creating a custom field type plugin what’s the best way to ensure that an assets are only loaded if the field is used?
Take a look at the WYSIWYG field in ACF. There is some conditional logic in it that only loads the WP uploader where it’s needed. It’s the only field in ACF that I know of that does something like this and probably your best bet at getting an idea of what you’re looking for.