Unwrapping.GenerateSecondaryUVSet not found in current context

I have generated a mesh in a C# script. When I try to use

Unwrapping.GenerateSecondaryUVSet( mesh );

I get an error:

CS0103: The name `Unwrapping' does not exist in the current context

In the script I am calling:

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

Am I missing something?

I solved this by adding using UnityEditor;

using UnityEngine;
using UnityEditor;
// ...

because Unwrapping class is part of UnityEditor:

I also have this bug but have added previously indicated using lines
I compile for Hololens2