This commit is contained in:
2024-09-20 20:30:10 +02:00
commit 4fabf1a6fd
29169 changed files with 1706941 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 76aa07459e97e401d8d9fb266cb41ff9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
using System.ComponentModel;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace Unity.VisualScripting
{
#if MODULE_ANIMATION_EXISTS
/// <summary>
/// Called when an animation event points to TriggerAnimationEvent.
/// </summary>
[UnitCategory("Events/Animation")]
[UnitShortTitle("Animation Event")]
[UnitTitle("Animation Event")]
[TypeIcon(typeof(Animation))]
[DisplayName("Visual Scripting Animation Event")]
public sealed class BoltAnimationEvent : MachineEventUnit<AnimationEvent>
{
protected override string hookName => EventHooks.AnimationEvent;
/// <summary>
/// The string parameter passed to the event.
/// </summary>
[DoNotSerialize]
[PortLabel("String")]
public ValueOutput stringParameter { get; private set; }
/// <summary>
/// The float parameter passed to the event.
/// </summary>
[DoNotSerialize]
[PortLabel("Float")]
public ValueOutput floatParameter { get; private set; }
/// <summary>
/// The integer parameter passed to the function.
/// </summary>
[DoNotSerialize]
[PortLabel("Integer")]
public ValueOutput intParameter { get; private set; }
/// <summary>
/// The Unity object parameter passed to the function.
/// </summary>
[DoNotSerialize]
[PortLabel("Object")]
public ValueOutput objectReferenceParameter { get; private set; }
protected override void Definition()
{
base.Definition();
stringParameter = ValueOutput<string>(nameof(stringParameter));
floatParameter = ValueOutput<float>(nameof(floatParameter));
intParameter = ValueOutput<int>(nameof(intParameter));
objectReferenceParameter = ValueOutput<UnityObject>(nameof(objectReferenceParameter));
}
protected override void AssignArguments(Flow flow, AnimationEvent args)
{
flow.SetValue(stringParameter, args.stringParameter);
flow.SetValue(floatParameter, args.floatParameter);
flow.SetValue(intParameter, args.intParameter);
flow.SetValue(objectReferenceParameter, args.objectReferenceParameter);
}
}
#endif
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c7f8ec277ae294bb78e0034461acc14f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,73 @@
using System.ComponentModel;
using UnityEngine;
namespace Unity.VisualScripting
{
#if MODULE_ANIMATION_EXISTS
/// <summary>
/// Called when an animation event points to TriggerAnimationEvent.
/// This version allows you to use the string parameter as the event name.
/// </summary>
[UnitCategory("Events/Animation")]
[UnitShortTitle("Animation Event")]
[UnitTitle("Named Animation Event")]
[TypeIcon(typeof(Animation))]
[DisplayName("Visual Scripting Named Animation Event")]
public sealed class BoltNamedAnimationEvent : MachineEventUnit<AnimationEvent>
{
protected override string hookName => EventHooks.AnimationEvent;
/// <summary>
/// The name of the event. The event will only trigger if this value
/// is equal to the string parameter passed in the animation event.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueInput name { get; private set; }
/// <summary>
/// The float parameter passed to the event.
/// </summary>
[DoNotSerialize]
[PortLabel("Float")]
public ValueOutput floatParameter { get; private set; }
/// <summary>
/// The integer parameter passed to the function.
/// </summary>
[DoNotSerialize]
[PortLabel("Integer")]
public ValueOutput intParameter { get; private set; }
/// <summary>
/// The Unity object parameter passed to the function.
/// </summary>
[DoNotSerialize]
[PortLabel("Object")]
public ValueOutput objectReferenceParameter { get; private set; }
protected override void Definition()
{
base.Definition();
name = ValueInput(nameof(name), string.Empty);
floatParameter = ValueOutput<float>(nameof(floatParameter));
intParameter = ValueOutput<int>(nameof(intParameter));
objectReferenceParameter = ValueOutput<GameObject>(nameof(objectReferenceParameter));
}
protected override bool ShouldTrigger(Flow flow, AnimationEvent animationEvent)
{
return CompareNames(flow, name, animationEvent.stringParameter);
}
protected override void AssignArguments(Flow flow, AnimationEvent animationEvent)
{
flow.SetValue(floatParameter, animationEvent.floatParameter);
flow.SetValue(intParameter, animationEvent.intParameter);
flow.SetValue(objectReferenceParameter, animationEvent.objectReferenceParameter);
}
}
#endif
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c614a03f84d54443f9265b20f2065128
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called by the Animator Component immediately before it updates its internal IK system.
/// This callback can be used to set the positions of the IK goals and their respective weights.
/// </summary>
[UnitCategory("Events/Animation")]
public sealed class OnAnimatorIK : GameObjectEventUnit<int>
{
public override Type MessageListenerType => typeof(AnimatorMessageListener);
protected override string hookName => EventHooks.OnAnimatorIK;
/// <summary>
/// The index of the layer on which the IK solver is called.
/// </summary>
[DoNotSerialize]
public ValueOutput layerIndex { get; private set; }
protected override void Definition()
{
base.Definition();
layerIndex = ValueOutput<int>(nameof(layerIndex));
}
protected override void AssignArguments(Flow flow, int layerIndex)
{
flow.SetValue(this.layerIndex, layerIndex);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6cd0cea553003493886d72e9be8e23dc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called at each frame after the state machines and the animations have been evaluated, but before On Animator IK.
/// This callback can be used for processing animation movements for modifying root motion.
/// </summary>
[UnitCategory("Events/Animation")]
public sealed class OnAnimatorMove : GameObjectEventUnit<EmptyEventArgs>
{
public override Type MessageListenerType => typeof(AnimatorMessageListener);
protected override string hookName => EventHooks.OnAnimatorMove;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2a614d65cdef1498eb33e5312e5b8672
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cd8236ae45f864b36b81fcc375c82fd6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the application gains focus.
/// </summary>
[UnitCategory("Events/Application")]
public sealed class OnApplicationFocus : GlobalEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnApplicationFocus;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a0274e2d9504747689564e43b42b2525
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the application loses focus.
/// </summary>
[UnitCategory("Events/Application")]
public sealed class OnApplicationLostFocus : GlobalEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnApplicationLostFocus;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0c820b13261c044f2b847e5f8f454400
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the application pauses.
/// </summary>
[UnitCategory("Events/Application")]
public sealed class OnApplicationPause : GlobalEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnApplicationPause;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 845c21f63a3264ef1b3405aa9ab7ca34
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the application quits.
/// </summary>
[UnitCategory("Events/Application")]
public sealed class OnApplicationQuit : GlobalEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnApplicationQuit;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9f959286f2d624a08b56b6d290871b33
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the application resumes.
/// </summary>
[UnitCategory("Events/Application")]
public sealed class OnApplicationResume : GlobalEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnApplicationResume;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a13da87eb3ffd4da1abc9b68445b4905
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System.ComponentModel;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when a UnityEvent points to TriggerUnityEvent.
/// </summary>
[UnitCategory("Events")]
[UnitTitle("UnityEvent")]
[UnitOrder(2)]
[DisplayName("Visual Scripting Unity Event")]
public sealed class BoltUnityEvent : MachineEventUnit<string>
{
protected override string hookName => EventHooks.UnityEvent;
/// <summary>
/// The name of the event. The event will only trigger if this value
/// is equal to the string parameter passed in the UnityEvent.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueInput name { get; private set; }
protected override void Definition()
{
base.Definition();
name = ValueInput(nameof(name), string.Empty);
}
protected override bool ShouldTrigger(Flow flow, string name)
{
return CompareNames(flow, this.name, name);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f1f5cc0ec16bb47f8bca4d860c0c1339
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Unity.VisualScripting
{
/// <summary>
/// A special named event with any amount of parameters called manually with the 'Trigger Custom Event' unit.
/// </summary>
[UnitCategory("Events")]
[UnitOrder(0)]
public sealed class CustomEvent : GameObjectEventUnit<CustomEventArgs>
{
public override Type MessageListenerType => null;
protected override string hookName => EventHooks.Custom;
[SerializeAs(nameof(argumentCount))]
private int _argumentCount;
[DoNotSerialize]
[Inspectable, UnitHeaderInspectable("Arguments")]
public int argumentCount
{
get => _argumentCount;
set => _argumentCount = Mathf.Clamp(value, 0, 10);
}
/// <summary>
/// The name of the event.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueInput name { get; private set; }
[DoNotSerialize]
public List<ValueOutput> argumentPorts { get; } = new List<ValueOutput>();
protected override void Definition()
{
base.Definition();
name = ValueInput(nameof(name), string.Empty);
argumentPorts.Clear();
for (var i = 0; i < argumentCount; i++)
{
argumentPorts.Add(ValueOutput<object>("argument_" + i));
}
}
protected override bool ShouldTrigger(Flow flow, CustomEventArgs args)
{
return CompareNames(flow, name, args.name);
}
protected override void AssignArguments(Flow flow, CustomEventArgs args)
{
for (var i = 0; i < argumentCount; i++)
{
flow.SetValue(argumentPorts[i], args.arguments[i]);
}
}
public static void Trigger(GameObject target, string name, params object[] args)
{
EventBus.Trigger(EventHooks.Custom, target, new CustomEventArgs(name, args));
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ea642e809385d4bd8951566868e7f534
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
namespace Unity.VisualScripting
{
public struct CustomEventArgs
{
public readonly string name;
public readonly object[] arguments;
public CustomEventArgs(string name, params object[] arguments)
{
this.name = name;
this.arguments = arguments;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3c1ba3d93ef674e0791b3de1b1c1e556
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 38164072c56204142abecaf906e1fad4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Use to draw gizmos that are always drawn in the editor.
/// </summary>
[UnitCategory("Events/Editor")]
public sealed class OnDrawGizmos : ManualEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnDrawGizmos;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 055ce80827fbe4f2db3b492b9e29c156
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
namespace Unity.VisualScripting
{
/// <summary>
/// Use to draw gizmos that are drawn in the editor when the object is selected.
/// </summary>
[UnitCategory("Events/Editor")]
public sealed class OnDrawGizmosSelected : ManualEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnDrawGizmosSelected;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 04fe7c6c4902d4254b658c04af933870
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,201 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Unity.VisualScripting
{
[SerializationVersion("A")]
[SpecialUnit]
public abstract class EventUnit<TArgs> : Unit, IEventUnit, IGraphElementWithData, IGraphEventHandler<TArgs>
{
public class Data : IGraphElementData
{
public EventHook hook;
public Delegate handler;
public bool isListening;
public HashSet<Flow> activeCoroutines = new HashSet<Flow>();
}
public virtual IGraphElementData CreateData()
{
return new Data();
}
/// <summary>
/// Run this event in a coroutine, enabling asynchronous flow like wait nodes.
/// </summary>
[Serialize]
[Inspectable]
[InspectorExpandTooltip]
public bool coroutine { get; set; } = false;
[DoNotSerialize]
[PortLabelHidden]
public ControlOutput trigger { get; private set; }
[DoNotSerialize]
protected abstract bool register { get; }
protected override void Definition()
{
isControlRoot = true;
trigger = ControlOutput(nameof(trigger));
}
public virtual EventHook GetHook(GraphReference reference)
{
throw new InvalidImplementationException($"Missing event hook for '{this}'.");
}
public virtual void StartListening(GraphStack stack)
{
var data = stack.GetElementData<Data>(this);
if (data.isListening)
{
return;
}
if (register)
{
var reference = stack.ToReference();
var hook = GetHook(reference);
Action<TArgs> handler = args => Trigger(reference, args);
EventBus.Register(hook, handler);
data.hook = hook;
data.handler = handler;
}
data.isListening = true;
}
void IGraphEventListener.StopListening(GraphStack stack, bool destroyed)
=> StopListening(stack, destroyed);
public void StopListening(GraphStack stack) => StopListening(stack, true);
protected virtual void StopListening(GraphStack stack, bool destroyed)
{
var data = stack.GetElementData<Data>(this);
if (!data.isListening)
{
return;
}
// The coroutine's flow will dispose at the next frame, letting us
// keep the current flow for clean up operations if needed
foreach (var activeCoroutine in data.activeCoroutines)
{
activeCoroutine.StopCoroutine(false);
}
if (register)
{
EventBus.Unregister(data.hook, data.handler);
stack.ClearReference();
data.handler = null;
}
data.isListening = false;
}
public override void Uninstantiate(GraphReference instance)
{
// Here, we're relying on the fact that OnDestroy calls Uninstantiate.
// We need to force-dispose any remaining coroutine to avoid
// memory leaks, because OnDestroy on the runner will not keep
// executing MoveNext() until our soft-destroy call at the end of Flow.Coroutine
// or even dispose the coroutine's enumerator (!).
var data = instance.GetElementData<Data>(this);
var coroutines = data.activeCoroutines.ToHashSetPooled();
#if UNITY_EDITOR
new FrameDelayedCallback(() => StopAllCoroutines(coroutines), 1);
#else
StopAllCoroutines(coroutines);
#endif
base.Uninstantiate(instance);
}
static void StopAllCoroutines(HashSet<Flow> activeCoroutines)
{
// The coroutine's flow will dispose instantly, thus modifying
// the activeCoroutines registry while we enumerate over it
foreach (var activeCoroutine in activeCoroutines)
{
activeCoroutine.StopCoroutineImmediate();
}
activeCoroutines.Free();
}
public bool IsListening(GraphPointer pointer)
{
if (!pointer.hasData)
{
return false;
}
return pointer.GetElementData<Data>(this).isListening;
}
public void Trigger(GraphReference reference, TArgs args)
{
var flow = Flow.New(reference);
if (!ShouldTrigger(flow, args))
{
flow.Dispose();
return;
}
AssignArguments(flow, args);
Run(flow);
}
protected virtual bool ShouldTrigger(Flow flow, TArgs args)
{
return true;
}
protected virtual void AssignArguments(Flow flow, TArgs args)
{
}
private void Run(Flow flow)
{
if (flow.enableDebug)
{
var editorData = flow.stack.GetElementDebugData<IUnitDebugData>(this);
editorData.lastInvokeFrame = EditorTimeBinding.frame;
editorData.lastInvokeTime = EditorTimeBinding.time;
}
if (coroutine)
{
flow.StartCoroutine(trigger, flow.stack.GetElementData<Data>(this).activeCoroutines);
}
else
{
flow.Run(trigger);
}
}
protected static bool CompareNames(Flow flow, ValueInput namePort, string calledName)
{
Ensure.That(nameof(calledName)).IsNotNull(calledName);
return calledName.Trim().Equals(flow.GetValue<string>(namePort)?.Trim(), StringComparison.OrdinalIgnoreCase);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd7208df7e06b49e19424ccc0a6cc140
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 651dc128fc72346d9b1cfedd6996f3ac
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
using UnityEngine.EventSystems;
namespace Unity.VisualScripting
{
public abstract class GenericGuiEventUnit : GameObjectEventUnit<BaseEventData>
{
/// <summary>
/// The event data.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput data { get; private set; }
protected override void Definition()
{
base.Definition();
data = ValueOutput<BaseEventData>(nameof(data));
}
protected override void AssignArguments(Flow flow, BaseEventData data)
{
flow.SetValue(this.data, data);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: de829102290134cd8bb7d6f030a0246c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called on the drag object when dragging is about to begin.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(OnDrag))]
[UnitOrder(16)]
public sealed class OnBeginDrag : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnBeginDragMessageListener);
protected override string hookName => EventHooks.OnBeginDrag;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9e09778b917d645b09bbd1aa93fb2ee0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when a user clicks the button and releases it.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(Button))]
[UnitOrder(1)]
public sealed class OnButtonClick : GameObjectEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnButtonClick;
public override Type MessageListenerType => typeof(UnityOnButtonClickMessageListener);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 219c0a220106e41bb9cbcaaa43f28129
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the cancel button is pressed.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(25)]
public sealed class OnCancel : GenericGuiEventUnit
{
public override Type MessageListenerType => typeof(UnityOnCancelMessageListener);
protected override string hookName => EventHooks.OnCancel;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66c7e0517c5f640cc9b62e077ca8dcbc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer deselects the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(23)]
public sealed class OnDeselect : GenericGuiEventUnit
{
public override Type MessageListenerType => typeof(UnityOnDeselectMessageListener);
protected override string hookName => EventHooks.OnDeselect;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6e80cd73486524a5fa8f4ebc514915c8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// When draging is occuring this will be called every time the cursor is moved.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(17)]
public sealed class OnDrag : PointerEventUnit
{
protected override string hookName => EventHooks.OnDrag;
public override Type MessageListenerType => typeof(UnityOnDragMessageListener);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 37c4fa51049d34219bcc2cc1ec7bea50
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called on a target that can accept a drop.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(OnDrag))]
[UnitOrder(19)]
public sealed class OnDrop : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnDropMessageListener);
protected override string hookName => EventHooks.OnDrop;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2cb32bdd74a974edca6f484948550496
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,43 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the current value of the dropdown has changed.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(Dropdown))]
[UnitOrder(4)]
public sealed class OnDropdownValueChanged : GameObjectEventUnit<int>
{
public override Type MessageListenerType => typeof(UnityOnDropdownValueChangedMessageListener);
protected override string hookName => EventHooks.OnDropdownValueChanged;
/// <summary>
/// The index of the newly selected option.
/// </summary>
[DoNotSerialize]
public ValueOutput index { get; private set; }
/// <summary>
/// The text of the newly selected option.
/// </summary>
[DoNotSerialize]
public ValueOutput text { get; private set; }
protected override void Definition()
{
base.Definition();
index = ValueOutput<int>(nameof(index));
text = ValueOutput<string>(nameof(text));
}
protected override void AssignArguments(Flow flow, int index)
{
flow.SetValue(this.index, index);
flow.SetValue(text, flow.GetValue<Dropdown>(target).options[index].text);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 78f803e994d6c4bbe8124c6fe6af6832
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,16 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called on the drag object when a drag finishes.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(OnDrag))]
[UnitOrder(18)]
public sealed class OnEndDrag : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnEndDragMessageListener);
protected override string hookName => EventHooks.OnEndDrag;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e21f2125eef984c988322507eec1b786
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using UnityEngine;
namespace Unity.VisualScripting
{
/// <summary>
/// Use to draw immediate mode GUI components.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(GUI))]
[UnitOrder(0)]
public sealed class OnGUI : GlobalEventUnit<EmptyEventArgs>
{
protected override string hookName => EventHooks.OnGUI;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5ea571a61c1ab43a9a23fa382fe65383
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,37 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the user finishes editing the text content either by submitting or by clicking somewhere that removes the
/// focus from the input field.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(InputField))]
[UnitOrder(3)]
public sealed class OnInputFieldEndEdit : GameObjectEventUnit<string>
{
public override Type MessageListenerType => typeof(UnityOnInputFieldEndEditMessageListener);
protected override string hookName => EventHooks.OnInputFieldEndEdit;
/// <summary>
/// The new text content of the input field.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput value { get; private set; }
protected override void Definition()
{
base.Definition();
value = ValueOutput<string>(nameof(value));
}
protected override void AssignArguments(Flow flow, string value)
{
flow.SetValue(this.value, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a42e318847ee04f87b8d94943e076984
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the text content of the input field has changed.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(InputField))]
[UnitOrder(2)]
public sealed class OnInputFieldValueChanged : GameObjectEventUnit<string>
{
public override Type MessageListenerType => typeof(UnityOnInputFieldValueChangedMessageListener);
protected override string hookName => EventHooks.OnInputFieldValueChanged;
/// <summary>
/// The new text content of the input field.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput value { get; private set; }
protected override void Definition()
{
base.Definition();
value = ValueOutput<string>(nameof(value));
}
protected override void AssignArguments(Flow flow, string value)
{
flow.SetValue(this.value, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 709ca1a7a118747e69db8e00aa958ff1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,35 @@
using System;
using UnityEngine.EventSystems;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when a move event occurs.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(21)]
public sealed class OnMove : GameObjectEventUnit<AxisEventData>
{
public override Type MessageListenerType => typeof(UnityOnMoveMessageListener);
protected override string hookName => EventHooks.OnMove;
/// <summary>
/// The axis event data.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput data { get; private set; }
protected override void Definition()
{
base.Definition();
data = ValueOutput<AxisEventData>(nameof(data));
}
protected override void AssignArguments(Flow flow, AxisEventData data)
{
flow.SetValue(this.data, data);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2a27e2d609de84c398a54131860c6a4c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer clicks the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(11)]
public sealed class OnPointerClick : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnPointerClickMessageListener);
protected override string hookName => EventHooks.OnPointerClick;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 550d17a43b8bb4bb18679bd5446149ee
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer presses the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(12)]
public sealed class OnPointerDown : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnPointerDownMessageListener);
protected override string hookName => EventHooks.OnPointerDown;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4fb1cea9670ed404b8b39e9753cb227d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer enters the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(14)]
public sealed class OnPointerEnter : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnPointerEnterMessageListener);
protected override string hookName => EventHooks.OnPointerEnter;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 47df8b0e5f16248518d0ea6e53cc9525
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer exits the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(15)]
public sealed class OnPointerExit : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnPointerExitMessageListener);
protected override string hookName => EventHooks.OnPointerExit;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b23bdd57a5894c158938fb1de8dfbbe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer releases the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(13)]
public sealed class OnPointerUp : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnPointerUpMessageListener);
protected override string hookName => EventHooks.OnPointerUp;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: be566868b1b28478da20297adaf20097
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when a mouse wheel scrolls.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(20)]
public sealed class OnScroll : PointerEventUnit
{
public override Type MessageListenerType => typeof(UnityOnScrollMessageListener);
protected override string hookName => EventHooks.OnScroll;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 962e1af06fc3e44f49a53caa13aff21e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,37 @@
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the current value of the scrollbar has changed.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(ScrollRect))]
[UnitOrder(7)]
public sealed class OnScrollRectValueChanged : GameObjectEventUnit<Vector2>
{
public override Type MessageListenerType => typeof(UnityOnScrollRectValueChangedMessageListener);
protected override string hookName => EventHooks.OnScrollRectValueChanged;
/// <summary>
/// The new scroll position of the scroll rect.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput value { get; private set; }
protected override void Definition()
{
base.Definition();
value = ValueOutput<Vector2>(nameof(value));
}
protected override void AssignArguments(Flow flow, Vector2 value)
{
flow.SetValue(this.value, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b75af33dbac24758a8197828e87f8a1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the current value of the scrollbar has changed.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(Scrollbar))]
[UnitOrder(6)]
public sealed class OnScrollbarValueChanged : GameObjectEventUnit<float>
{
public override Type MessageListenerType => typeof(UnityOnScrollbarValueChangedMessageListener);
protected override string hookName => EventHooks.OnScrollbarValueChanged;
/// <summary>
/// The new position value of the scrollbar.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput value { get; private set; }
protected override void Definition()
{
base.Definition();
value = ValueOutput<float>(nameof(value));
}
protected override void AssignArguments(Flow flow, float value)
{
flow.SetValue(this.value, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7de1914c008434f0ba80bfb3a0a51c3a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the pointer selects the GUI element.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(22)]
public sealed class OnSelect : GenericGuiEventUnit
{
public override Type MessageListenerType => typeof(UnityOnSelectMessageListener);
protected override string hookName => EventHooks.OnSelect;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4540a76c964184c6885d7ff930a19d72
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the current value of the slider has changed.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(Slider))]
[UnitOrder(8)]
public sealed class OnSliderValueChanged : GameObjectEventUnit<float>
{
public override Type MessageListenerType => typeof(UnityOnSliderValueChangedMessageListener);
protected override string hookName => EventHooks.OnSliderValueChanged;
/// <summary>
/// The new numeric value of the slider.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput value { get; private set; }
protected override void Definition()
{
base.Definition();
value = ValueOutput<float>(nameof(value));
}
protected override void AssignArguments(Flow flow, float value)
{
flow.SetValue(this.value, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1ae7f5eeba3d646d8ab26bd7052e59df
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the submit button is pressed.
/// </summary>
[UnitCategory("Events/GUI")]
[UnitOrder(24)]
public sealed class OnSubmit : GenericGuiEventUnit
{
public override Type MessageListenerType => typeof(UnityOnSubmitMessageListener);
protected override string hookName => EventHooks.OnSubmit;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 53b84e2c33f614e819d1917fbf0c6230
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using System;
using UnityEngine.UI;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the current value of the toggle has changed.
/// </summary>
[UnitCategory("Events/GUI")]
[TypeIcon(typeof(Toggle))]
[UnitOrder(5)]
public sealed class OnToggleValueChanged : GameObjectEventUnit<bool>
{
public override Type MessageListenerType => typeof(UnityOnToggleValueChangedMessageListener);
protected override string hookName => EventHooks.OnToggleValueChanged;
/// <summary>
/// The new boolean value of the toggle.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput value { get; private set; }
protected override void Definition()
{
base.Definition();
value = ValueOutput<bool>(nameof(value));
}
protected override void AssignArguments(Flow flow, bool value)
{
flow.SetValue(this.value, value);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0bd3f95e953dd4fdcb2cc87d32acfd80
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
using UnityEngine.EventSystems;
namespace Unity.VisualScripting
{
public abstract class PointerEventUnit : GameObjectEventUnit<PointerEventData>
{
/// <summary>
/// The pointer event data.
/// </summary>
[DoNotSerialize]
[PortLabelHidden]
public ValueOutput data { get; private set; }
protected override void Definition()
{
base.Definition();
data = ValueOutput<PointerEventData>(nameof(data));
}
protected override void AssignArguments(Flow flow, PointerEventData data)
{
flow.SetValue(this.data, data);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 388725224c49a43ffbaf106cda6dccad
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,104 @@
using System;
using UnityEngine;
namespace Unity.VisualScripting
{
public abstract class GameObjectEventUnit<TArgs> : EventUnit<TArgs>, IGameObjectEventUnit
{
protected sealed override bool register => true;
public abstract Type MessageListenerType { get; }
public new class Data : EventUnit<TArgs>.Data
{
public GameObject target;
}
public override IGraphElementData CreateData()
{
return new Data();
}
/// <summary>
/// The game object that listens for the event.
/// </summary>
[DoNotSerialize]
[NullMeansSelf]
[PortLabel("Target")]
[PortLabelHidden]
public ValueInput target { get; private set; }
protected override void Definition()
{
base.Definition();
target = ValueInput<GameObject>(nameof(target), null).NullMeansSelf();
}
public override EventHook GetHook(GraphReference reference)
{
if (!reference.hasData)
{
return hookName;
}
var data = reference.GetElementData<Data>(this);
return new EventHook(hookName, data.target);
}
protected virtual string hookName => throw new InvalidImplementationException($"Missing event hook for '{this}'.");
private void UpdateTarget(GraphStack stack)
{
var data = stack.GetElementData<Data>(this);
var wasListening = data.isListening;
var newTarget = Flow.FetchValue<GameObject>(target, stack.ToReference());
if (newTarget != data.target)
{
if (wasListening)
{
StopListening(stack, true);
}
data.target = newTarget;
if (wasListening)
{
StartListening(stack, false);
}
}
}
protected void StartListening(GraphStack stack, bool updateTarget)
{
if (updateTarget)
{
UpdateTarget(stack);
}
var data = stack.GetElementData<Data>(this);
if (data.target == null)
{
return;
}
if (UnityThread.allowsAPI)
{
if (MessageListenerType != null) // can be null. CustomEvent doesn't need a message listener
MessageListener.AddTo(MessageListenerType, data.target);
}
base.StartListening(stack);
}
public override void StartListening(GraphStack stack)
{
StartListening(stack, true);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9e6cb5afb83024163b511b0ecdb549b2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
namespace Unity.VisualScripting
{
public abstract class GlobalEventUnit<TArgs> : EventUnit<TArgs>
{
protected override bool register => true;
protected virtual string hookName => throw new InvalidImplementationException();
public override EventHook GetHook(GraphReference reference)
{
return hookName;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fcec00bd340484d14b1623b0045c8b9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ba6dc0659417f4e999f20101bcb1927f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the list of children of the transform of the game object has changed.
/// </summary>
[UnitCategory("Events/Hierarchy")]
public sealed class OnTransformChildrenChanged : GameObjectEventUnit<EmptyEventArgs>
{
public override Type MessageListenerType => typeof(UnityOnTransformChildrenChangedMessageListener);
protected override string hookName => EventHooks.OnTransformChildrenChanged;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9c2590fcaf8284fd4a2f8de1abcf3021
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using System;
namespace Unity.VisualScripting
{
/// <summary>
/// Called when the parent property of the transform of the game object has changed.
/// </summary>
[UnitCategory("Events/Hierarchy")]
public sealed class OnTransformParentChanged : GameObjectEventUnit<EmptyEventArgs>
{
public override Type MessageListenerType => typeof(UnityOnTransformParentChangedMessageListener);
protected override string hookName => EventHooks.OnTransformParentChanged;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: be7e95fccd0884b4b9ff35fa43f12cd5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,13 @@
using System;
namespace Unity.VisualScripting
{
public interface IEventUnit : IUnit, IGraphEventListener
{
bool coroutine { get; }
}
public interface IGameObjectEventUnit : IEventUnit
{
Type MessageListenerType { get; }
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 29c380f94a7fa4c689552cdcb68ba45e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e9d0cb75db03b44ebae978ba3dbcd6de
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace Unity.VisualScripting
{
public interface IMouseEventUnit
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5b95614b624264d788336d84aa8195ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More