Hide
TimeSpan

Allows you to set a timespan using long type.

Tip
This will requires you to manually convert long to TimeSpan. You may want to see Extended Serialization to directly serialize a TimeSpan type
using SaintsField; [DateTime] // Save value in this public long ts; // Use this in script public TimeSpan MyTimeSpan => new TimeSpan(dt); [ShowInInspector] private long v => dt; [ShowInInspector, TimeSpan] // Show This as TimeSpan private long _showTsLong;

It works with ShowInInspector

[ShowInInspector, TimeSpan] private long ShowTsLong { get => dt; set => dt = value; }

It works with ShowInInspector/Button parameters & return value

[ShowInInspector] [TimeSpan] private long ShowTimeSpan([TimeSpan] long ts) => ts; [Button] [TimeSpan] private long ShowTimeSpan([TimeSpan] long ts) => ts;