Experimental: this API is experimental and might be changed or removed in the future.

VisualElement.OverwriteFromPersistedData

Switch to Manual
public void OverwriteFromPersistedData (object obj, string key);

Parameters

key当前 VisualElement 的键,要用于 EditorWindow 上的持久性存储。
obj要覆盖的对象。

Description

从持久性数据存储覆盖对象。

This will overwrite all public and SerializeField-marked fields on the given object (meant to usually be the current VisualElement). It's better to use this method if the fields you want to persist on your VisualElement are mostly basic types and you don't want to create a class for them.