You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
975 B
C#
37 lines
975 B
C#
1 year ago
|
using System;
|
||
|
using UnityEditor;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Packages.Rider.Editor
|
||
|
{
|
||
|
#if UNITY_2020_1_OR_NEWER // API doesn't exist in 2019.4
|
||
|
[FilePath("Library/com.unity.ide.rider/PersistedState.asset", FilePathAttribute.Location.ProjectFolder)]
|
||
|
#endif
|
||
|
internal class RiderScriptEditorPersistedState : ScriptableSingleton<RiderScriptEditorPersistedState>
|
||
|
{
|
||
|
[SerializeField] private long lastWriteTicks;
|
||
|
[SerializeField] private long manifestJsonLastWriteTicks;
|
||
|
|
||
|
public DateTime? LastWrite
|
||
|
{
|
||
|
get => DateTime.FromBinary(lastWriteTicks);
|
||
|
set
|
||
|
{
|
||
|
if (!value.HasValue) return;
|
||
|
lastWriteTicks = value.Value.ToBinary();
|
||
|
Save(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public DateTime? ManifestJsonLastWrite
|
||
|
{
|
||
|
get => DateTime.FromBinary(manifestJsonLastWriteTicks);
|
||
|
set
|
||
|
{
|
||
|
if (!value.HasValue) return;
|
||
|
manifestJsonLastWriteTicks = value.Value.ToBinary();
|
||
|
Save(true);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|