unity if in editor

Code Example - unity if in editor

                
                        #if UNITY_EDITOR
// Here put your code, it will not be compiled in the builds so you're safe to use editor libraries
#endif