15 [Serializable]
private class FloatUnityEvent : UnityEvent<float> { }
17 [SerializeField]
private FloatUnityEvent componentValueToSet =
default;
20 protected override void OnChange(Emitter emitter) => componentValueToSet.Invoke(Asset.
Value);
23 [MenuItem(
"Component/CustomAssets/Float Driver")]
private static void AddConnector() =>
24 Selection.activeTransform.gameObject.AddComponent<
FloatDriver>();
virtual T Value
For safe(ish) access to the contents field
WithEmitter AssetToMonitor
Used to classes that have a listener can get back the Custom Asset that triggered it ...
Common code for all event listener MonoBehaviours. It registers and deregisters the listener with the...
Common code for all event listeners. It registers and deregisters the listener with the channel ...
Float CustomAsset contains a float value which can be connected directly to OnValueChange callbacks i...