Documentation

Unity Engine

Unity Engine

GetString(string, string)

Retrieve a String value.
Read time 1 minuteLast updated 2 months ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static string GetString(string key, string defaultValue)

Parameters


defaultValue

Returns

Type

Description

string

Remarks

Due to the behavior of Unity's serialization system,
SessionState.GetString
returns an empty string instead of
null
when no string value is stored for the key, even if you specify
null
as the
defaultValue
.