AutoPrefs.

AutoPrefs.EditorVector2 Class

Summary

[Editor-Only] An InspectorGadgets.AutoPrefs.AutoPref`1 which encapsulates a UnityEngine.Vector2 value stored in UnityEditor.EditorPrefs.
graph BT Type-->Base0["AutoPrefs.Vector2"] click Base0 "/inspector-gadgets/api/InspectorGadgets/Vector2" Base0-->Base1["AutoPrefs.AutoPref<Vector2>"] Base1-->Base2["Object"] Type-.->Interface0["AutoPrefs.IAutoPref"] click Interface0 "/inspector-gadgets/api/InspectorGadgets/IAutoPref" Type["AutoPrefs.EditorVector2"] class Type type-node

Syntax

public class AutoPrefs.EditorVector2 : AutoPrefs.Vector2, AutoPrefs.IAutoPref

Constructors

Name Summary
EditorVector2(string, Vector2, Action<Vector2>) Constructs an InspectorGadgets.Editor.AutoPrefs.EditorString pref with the specified `key` and `defaultValue`.

Fields

Name Constant Value Summary
KeyY
The key used to identify the y value of this pref.
Inherited from AutoPrefs.Vector2

Properties

Name Value Summary
KeyX string
The key used to identify the x value of this pref.
Inherited from AutoPrefs.Vector2

Methods

Name Value Summary
DeletePref() void
Deletes the value of this pref from UnityEditor.EditorPrefs and reverts to the default value.
IsSaved() bool
Returns true if UnityEditor.EditorPrefs currently contains a value for this pref.
Load() Vector2
Loads the value of this pref from UnityEditor.EditorPrefs.
Save() void
Saves the value of this pref to UnityEditor.EditorPrefs.

Operators

Name Value Summary
implicit operator AutoPrefs.EditorVector2(string) AutoPrefs.EditorVector2
implicit operator AutoPrefs.Vector2(string) AutoPrefs.Vector2
Inherited from AutoPrefs.Vector2
implicit operator Vector2(AutoPrefs.AutoPref<Vector2>) Vector2
Inherited from AutoPrefs.AutoPref<Vector2>
operator !=(AutoPrefs.AutoPref<Vector2>, Vector2) bool
Inherited from AutoPrefs.AutoPref<Vector2>
operator ==(AutoPrefs.AutoPref<Vector2>, Vector2) bool
Inherited from AutoPrefs.AutoPref<Vector2>