15 [Serializable]
private class StringUnityEvent : UnityEvent<string> { }
17 [SerializeField]
private StringUnityEvent componentValueToSet =
default;
20 protected override void OnChange(Emitter emitter) => componentValueToSet.Invoke(Asset);
23 [MenuItem(
"Component/CustomAssets/String Driver")]
private static void AddConnector() =>
24 Selection.activeTransform.gameObject.AddComponent<
StringDriver>();
WithEmitter AssetToMonitor
Used to classes that have a listener can get back the Custom Asset that triggered it ...
Drive component string values directly from a custom asset
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 ...