20 lines
No EOL
511 B
C#
20 lines
No EOL
511 B
C#
using R3;
|
|
using UnityEngine;
|
|
|
|
namespace KitsuneCafe.SOAP
|
|
{
|
|
public class ReactiveValue<T> : ReactiveSource<T>
|
|
{
|
|
#if UNITY_EDITOR
|
|
[TextArea]
|
|
public string Description = "";
|
|
#endif
|
|
|
|
[SerializeField]
|
|
protected SerializableReactiveProperty<T> value;
|
|
public T Value { get => value.Value; set { this.value.Value = value; } }
|
|
|
|
public ReadOnlyReactiveProperty<T> AsReactiveProperty() => value;
|
|
public override Observable<T> AsObservable() => value;
|
|
}
|
|
} |