GUID variable declaration error


I’m having trouble with passing a Guid into a method of a webservice.

I declare this variable:

Guid guidID = new Guid("CA761232-ED42-11CE-BACD-00AA0057B223");

However, I get the following error:

error CS0246: The type or namespace name `Guid' could not be found. Are you missing a using directive or an assembly reference?

Does anyone have any idea how to fix this issue?

Thanks in advance :slight_smile:

Guid is in the System namespace, so either add using System; at the top of your script, or use System.Guid(...).

If you already did that, try changing in the Player Settings the entry saying “.NET 2.0 subset” to “.NET 2.0”.