Build and Selection problem

Hi,

Here’s my problem, I 've got a script which is must be executed in editmode

@script ExecuteInEditMode()

This script uses the Selection class inside the update, but when I want to build,
I’ve got the following error :

Unknown identifier: ‘Selection’.

So I have to comment this section everytimes I build, is there a cleaner way to do that ?

Cordially

Selection is part of the editor functionality and will not work outside the editor at all.

you have to maintain your own selection system if you want it in builds

Thx for you answer,

I don’t want it to work outside the editor,
I just want it to build, since it’s not used.