---
tags:
    - "Unique"
    - "Identifier"
    - "ID"
    - "UUID"
    - "Random"
    - "Key"
    - "Text"
---

# New GUID

[Operations](../index.md) / [Generate](index.md) / **New GUID**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Generates a new globally unique identifier every time this value is read

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("New GUID")]
    [Category("Operations/Generate/New GUID")]

    [Description("Generates a new globally unique identifier every time this value is read")]
    [Image(typeof(IconID), ColorTheme.Type.Yellow)]

    [Keywords("Unique", "Identifier", "ID", "UUID", "Random", "Key", "Text")]

    [Serializable]
    public class TypeStringGuid : TypeString
    {
        public override string Get(Args args)
        {
            return Guid.NewGuid().ToString();
        }

        public override string ToString()
        {
            return "New GUID";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnUpdate;
    }
}

```

