Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetString(string, string)

Retrieve a String value.
Read time 1 minuteLast updated 6 days 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
.