/// <summary> /// 3. Loading data from EditorSettings /// Used if was in play mode and the play mode has been stopped /// </summary> public static AddStyleDeclarationPersistedData Load() { AddStyleDeclarationPersistedData persistedData = new AddStyleDeclarationPersistedData { ClassName = EditorPrefs.GetString(ClassNameKey) }; return(persistedData); }
/// <summary> /// 1. Creates the persisted data from ordinary data object /// We are using the persisted data even if we are not in play mode /// This is because we want to have a single pipeline for both cases /// </summary> /// <param name="dataObject"></param> /// <returns></returns> public static AddStyleDeclarationPersistedData FromDataObject(StyleDeclarationDataObject dataObject) { AddStyleDeclarationPersistedData persistedData = new AddStyleDeclarationPersistedData { ClassName = dataObject.Type }; return(persistedData); }
/// <summary> /// 3. Loading data from EditorSettings /// Used if was in play mode and the play mode has been stopped /// </summary> public static AddStyleDeclarationPersistedData Load() { AddStyleDeclarationPersistedData persistedData = new AddStyleDeclarationPersistedData { ClassName = EditorPrefs.GetString(ClassNameKey) }; return persistedData; }
/// <summary> /// 1. Creates the persisted data from ordinary data object /// We are using the persisted data even if we are not in play mode /// This is because we want to have a single pipeline for both cases /// </summary> /// <param name="dataObject"></param> /// <returns></returns> public static AddStyleDeclarationPersistedData FromDataObject(StyleDeclarationDataObject dataObject) { AddStyleDeclarationPersistedData persistedData = new AddStyleDeclarationPersistedData { ClassName = dataObject.Type }; return persistedData; }