Adaug proiectul Unity

This commit is contained in:
2026-11-01 23:39:55 +02:00
parent cb14d9d37d
commit 863eac8f2c
23463 changed files with 5412601 additions and 0 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cfd47b21b6c654315bf28318c87beb98
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,41 @@
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Composites
{
internal class AxisCompositeEditor : InputParameterEditor<AxisComposite>
{
private GUIContent m_WhichAxisWinsLabel = new GUIContent("Which Side Wins",
"Determine which axis 'wins' if both are actuated at the same time. "
+ "If 'Neither' is selected, the result is 0 (or, more precisely, "
+ "the midpoint between minValue and maxValue).");
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
target.whichSideWins = (AxisComposite.WhichSideWins)EditorGUILayout.EnumPopup(m_WhichAxisWinsLabel, target.whichSideWins);
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
var modeField = new EnumField(m_WhichAxisWinsLabel.text, target.whichSideWins)
{
tooltip = m_WhichAxisWinsLabel.tooltip
};
modeField.RegisterValueChangedCallback(evt =>
{
target.whichSideWins = (AxisComposite.WhichSideWins)evt.newValue;
onChangedCallback();
});
root.Add(modeField);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 504f28d05365c4127b7216fd72484311
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,41 @@
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Composites
{
internal class Vector2CompositeEditor : InputParameterEditor<Vector2Composite>
{
private GUIContent m_ModeLabel = new GUIContent("Mode",
"How to synthesize a Vector2 from the inputs. Digital "
+ "treats part bindings as buttons (on/off) whereas Analog preserves "
+ "floating-point magnitudes as read from controls.");
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
target.mode = (Vector2Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode);
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
var modeField = new EnumField(m_ModeLabel.text, target.mode)
{
tooltip = m_ModeLabel.tooltip
};
modeField.RegisterValueChangedCallback(evt =>
{
target.mode = (Vector2Composite.Mode)evt.newValue;
onChangedCallback();
});
root.Add(modeField);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0eb07b1cf75d04357a7fbd95093f1fa9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,41 @@
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Composites
{
internal class Vector3CompositeEditor : InputParameterEditor<Vector3Composite>
{
private GUIContent m_ModeLabel = new GUIContent("Mode",
"How to synthesize a Vector3 from the inputs. Digital "
+ "treats part bindings as buttons (on/off) whereas Analog preserves "
+ "floating-point magnitudes as read from controls.");
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
target.mode = (Vector3Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode);
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
var modeField = new EnumField(m_ModeLabel.text, target.mode)
{
tooltip = m_ModeLabel.tooltip
};
modeField.RegisterValueChangedCallback(evt =>
{
target.mode = (Vector3Composite.Mode)evt.newValue;
onChangedCallback();
});
root.Add(modeField);
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d9d2c9fcdc7f646d083ee2360d5139bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEditor;
namespace UnityEngine.InputSystem.Editor
{
/// <summary>
/// Editor extensions for InputControlScheme to handle SerializedProperty construction.
/// </summary>
internal static class InputControlSchemeEditorExtensions
{
/// <summary>
/// Creates an InputControlScheme from a SerializedProperty.
/// </summary>
public static InputControlScheme FromSerializedProperty(SerializedProperty sp)
{
var requirements = new List<InputControlScheme.DeviceRequirement>();
var deviceRequirementsArray = sp.FindPropertyRelative("m_DeviceRequirements");
if (deviceRequirementsArray == null)
throw new System.ArgumentException("The serialized property does not contain an InputControlScheme object.");
foreach (SerializedProperty deviceRequirement in deviceRequirementsArray)
{
requirements.Add(new InputControlScheme.DeviceRequirement
{
controlPath = deviceRequirement.FindPropertyRelative("m_ControlPath").stringValue,
m_Flags = (InputControlScheme.DeviceRequirement.Flags)deviceRequirement.FindPropertyRelative("m_Flags").enumValueFlag
});
}
var scheme = new InputControlScheme();
scheme.m_Name = sp.FindPropertyRelative("m_Name").stringValue;
scheme.m_DeviceRequirements = requirements.ToArray();
scheme.m_BindingGroup = sp.FindPropertyRelative("m_BindingGroup").stringValue;
return scheme;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 87e3bb948c7f2482a8f4f57942832312
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e4bf910aee5784821a3ebd59e4cdac79
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,47 @@
#if UNITY_EDITOR
using System;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Interactions
{
/// <summary>
/// UI that is displayed when editing <see cref="HoldInteraction"/> in the editor.
/// </summary>
internal class HoldInteractionEditor : InputParameterEditor<HoldInteraction>
{
protected override void OnEnable()
{
m_DurationSetting.Initialize("Hold Time",
"Time (in seconds) that a control has to be held in order for it to register as a hold.",
"Default Hold Time",
() => target.duration, x => target.duration = x, () => InputSystem.settings.defaultHoldTime);
m_PressPointSetting.Initialize("Press Point",
"Float value that an axis control has to cross for it to be considered pressed.",
"Default Button Press Point",
() => target.pressPoint, v => target.pressPoint = v, () => ButtonControl.s_GlobalDefaultButtonPressPoint);
}
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
m_DurationSetting.OnGUI();
m_PressPointSetting.OnGUI();
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
m_DurationSetting.OnDrawVisualElements(root, onChangedCallback);
m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback);
CustomOrDefaultSetting.AddSharedDefaultSettingsFooter(root,
new[] { m_PressPointSetting, m_DurationSetting });
}
private CustomOrDefaultSetting m_DurationSetting;
private CustomOrDefaultSetting m_PressPointSetting;
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fde8c91ad1cbc48e7a49f856f44724c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,72 @@
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Interactions
{
/// <summary>
/// UI that is displayed when editing <see cref="MultiTapInteraction"/> in the editor.
/// </summary>
internal class MultiTapInteractionEditor : InputParameterEditor<MultiTapInteraction>
{
protected override void OnEnable()
{
m_TapTimeSetting.Initialize("Max Tap Duration",
"Time (in seconds) within with a control has to be released again for it to register as a tap. If the control is held "
+ "for longer than this time, the tap is canceled.",
"Default Tap Time",
() => target.tapTime, x => target.tapTime = x, () => InputSystem.settings.defaultTapTime);
m_TapDelaySetting.Initialize("Max Tap Spacing",
"The maximum delay (in seconds) allowed between each tap. If this time is exceeded, the multi-tap is canceled.",
"Default Tap Spacing",
() => target.tapDelay, x => target.tapDelay = x, () => InputSystem.settings.multiTapDelayTime);
m_PressPointSetting.Initialize("Press Point",
"The amount of actuation a control requires before being considered pressed. If not set, default to "
+ "'Default Button Press Point' in the global input settings.",
"Default Button Press Point",
() => target.pressPoint, v => target.pressPoint = v,
() => InputSystem.settings.defaultButtonPressPoint);
}
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
target.tapCount = EditorGUILayout.IntField(m_TapCountLabel, target.tapCount);
m_TapDelaySetting.OnGUI();
m_TapTimeSetting.OnGUI();
m_PressPointSetting.OnGUI();
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
var tapCountField = new IntegerField(m_TapCountLabel.text)
{
value = target.tapCount,
tooltip = m_TapCountLabel.tooltip
};
tapCountField.RegisterValueChangedCallback(evt =>
{
target.tapCount = evt.newValue;
onChangedCallback?.Invoke();
});
root.Add(tapCountField);
m_TapDelaySetting.OnDrawVisualElements(root, onChangedCallback);
m_TapTimeSetting.OnDrawVisualElements(root, onChangedCallback);
m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback);
CustomOrDefaultSetting.AddSharedDefaultSettingsFooter(root,
new[] { m_TapTimeSetting, m_TapDelaySetting, m_PressPointSetting });
}
private readonly GUIContent m_TapCountLabel = new GUIContent("Tap Count", "How many taps need to be performed in succession. Two means double-tap, three means triple-tap, and so on.");
private CustomOrDefaultSetting m_PressPointSetting;
private CustomOrDefaultSetting m_TapTimeSetting;
private CustomOrDefaultSetting m_TapDelaySetting;
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 991f8cb0b79a44a8687af2973bc223cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,67 @@
#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Interactions
{
/// <summary>
/// UI that is displayed when editing <see cref="PressInteraction"/> in the editor.
/// </summary>
// ReSharper disable once UnusedMember.Global
internal class PressInteractionEditor : InputParameterEditor<PressInteraction>
{
protected override void OnEnable()
{
m_PressPointSetting.Initialize("Press Point",
"The amount of actuation a control requires before being considered pressed. If not set, default to "
+ "'Default Button Press Point' in the global input settings.",
"Default Button Press Point",
() => target.pressPoint, v => target.pressPoint = v,
() => InputSystem.settings.defaultButtonPressPoint);
}
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
EditorGUILayout.HelpBox(s_HelpBoxText);
target.behavior = (PressBehavior)EditorGUILayout.EnumPopup(s_PressBehaviorLabel, target.behavior);
m_PressPointSetting.OnGUI();
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
root.Add(new HelpBox(s_HelpBoxText.text, HelpBoxMessageType.None));
var behaviourDropdown = new EnumField(s_PressBehaviorLabel.text, target.behavior)
{
tooltip = s_PressBehaviorLabel.tooltip
};
behaviourDropdown.RegisterValueChangedCallback(evt =>
{
target.behavior = (PressBehavior)evt.newValue;
onChangedCallback?.Invoke();
});
root.Add(behaviourDropdown);
m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback);
CustomOrDefaultSetting.AddSharedDefaultSettingsFooter(root,
new[] { m_PressPointSetting });
}
private CustomOrDefaultSetting m_PressPointSetting;
private static readonly GUIContent s_HelpBoxText = EditorGUIUtility.TrTextContent("Note that the 'Press' interaction is only "
+ "necessary when wanting to customize button press behavior. For default press behavior, simply set the action type to 'Button' "
+ "and use the action without interactions added to it.");
private static readonly GUIContent s_PressBehaviorLabel = EditorGUIUtility.TrTextContent("Trigger Behavior",
"Determines how button presses trigger the action. By default (PressOnly), the action is performed on press. "
+ "With ReleaseOnly, the action is performed on release. With PressAndRelease, the action is performed on press and "
+ "canceled on release.");
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bb40b2b9ded5942e98788267f3adbc11
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,46 @@
#if UNITY_EDITOR
using System;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Interactions
{
internal class SlowTapInteractionEditor : InputParameterEditor<SlowTapInteraction>
{
protected override void OnEnable()
{
m_DurationSetting.Initialize("Min Tap Duration",
"Minimum time (in seconds) that a control has to be held for it to register as a slow tap. If the control is released "
+ "before this time, the slow tap is canceled.",
"Default Slow Tap Time",
() => target.duration, x => target.duration = x, () => InputSystem.settings.defaultSlowTapTime);
m_PressPointSetting.Initialize("Press Point",
"The amount of actuation a control requires before being considered pressed. If not set, default to "
+ "'Default Button Press Point' in the global input settings.",
"Default Button Press Point",
() => target.pressPoint, v => target.pressPoint = v,
() => InputSystem.settings.defaultButtonPressPoint);
}
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
m_DurationSetting.OnGUI();
m_PressPointSetting.OnGUI();
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
m_DurationSetting.OnDrawVisualElements(root, onChangedCallback);
m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback);
CustomOrDefaultSetting.AddSharedDefaultSettingsFooter(root,
new[] { m_DurationSetting, m_PressPointSetting });
}
private CustomOrDefaultSetting m_DurationSetting;
private CustomOrDefaultSetting m_PressPointSetting;
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 31783c2cca6e44f419396b9d094e2b31
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,46 @@
#if UNITY_EDITOR
using System;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
namespace UnityEngine.InputSystem.Interactions
{
internal class TapInteractionEditor : InputParameterEditor<TapInteraction>
{
protected override void OnEnable()
{
m_DurationSetting.Initialize("Max Tap Duration",
"Time (in seconds) within with a control has to be released again for it to register as a tap. If the control is held "
+ "for longer than this time, the tap is canceled.",
"Default Tap Time",
() => target.duration, x => target.duration = x, () => InputSystem.settings.defaultTapTime);
m_PressPointSetting.Initialize("Press Point",
"The amount of actuation a control requires before being considered pressed. If not set, default to "
+ "'Default Button Press Point' in the global input settings.",
"Default Button Press Point",
() => target.pressPoint, v => target.pressPoint = v,
() => InputSystem.settings.defaultButtonPressPoint);
}
public override void OnGUI()
{
if (!InputSystem.settings.useIMGUIEditorForAssets)
return;
m_DurationSetting.OnGUI();
m_PressPointSetting.OnGUI();
}
public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback)
{
m_DurationSetting.OnDrawVisualElements(root, onChangedCallback);
m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback);
CustomOrDefaultSetting.AddSharedDefaultSettingsFooter(root,
new[] { m_DurationSetting, m_PressPointSetting });
}
private CustomOrDefaultSetting m_DurationSetting;
private CustomOrDefaultSetting m_PressPointSetting;
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 49b16a0da25fb4403a778600bd0278db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: