What ends up happening if my project has a [SourceTemplate] annotated method, but the user isn't using Rider?

Hello,

    I was wondering what ends up happening if my project has a [SourceTemplate] annotated method, but the user isn't using Rider? I make a number of Unity packages and just discovered the amazingness that is SourceTemplates, but am unsure of the impact it might have on a developer using my code if they don't have Rider or ReSharper. Is there some sort of compiler define I can put around the annotated method to make sure there aren't any issues for them?

Something like?

#if USING_JETBRAINS_IDE
[
SourceTemplate]
public static void forEach<T>(this IEnumerable<T> z)
{
z.ForEach(x =>
{
//$ $END$
});
}
#endif

Thanks,

Dan

1 comment
Comment actions Permalink

Hello,

>Is there some sort of compiler define I can put around the annotated method to make sure there aren't any issues for them?

Unfortunately, no, there is not.

There should not be any issues if your project is referencing JetBrains.Annotation package and you use specific annotations from it. There should not be any build issues even if you do not use Rider / ReSharper.

If you have any problems with this, please submit a new support request.

K.R.

Sofia

 

 

0

Please sign in to leave a comment.