How can I generate a GUID or a UUID from within Unity

Do we use GUID ?

According to Mono Compatibility page(doesn’t exist anymore. This is just an archive.org version) Guid is fully supported on all platforms / Mono versions.

It’s:

System.Guid.NewGuid();

So in C# you would do something like:

System.Guid myGUID = System.Guid.NewGuid();

Usually you want:

string newBackstageItemID = System.Guid.NewGuid().ToString();

(Like poday mentioned, if you use the micro mscorlib the Guid class is not included and you have to use a custom way to build a pseudo Guid.)