浏览代码

Added UIEventManager

/main
Thomas ICHÉ 6 年前
当前提交
048cdf8b
共有 4 个文件被更改,包括 124 次插入0 次删除
  1. 82
      Resources/Default_UIEventManager.prefab
  2. 7
      Resources/Default_UIEventManager.prefab.meta
  3. 24
      Runtime/Managers/Implementations/UIEventManager.cs
  4. 11
      Runtime/Managers/Implementations/UIEventManager.cs.meta

82
Resources/Default_UIEventManager.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6448262098318784316
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6448262098318784312}
- component: {fileID: 6448262098318784313}
- component: {fileID: 6448262098318784318}
- component: {fileID: 6448262098318784319}
m_Layer: 0
m_Name: UIEventManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6448262098318784312
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6448262098318784316}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.35547, y: 1.5265768, z: -15.313433}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6448262098318784313
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6448262098318784316}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!114 &6448262098318784318
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6448262098318784316}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b5bc0b3023dd1f8439a43adc2d70379f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EventSystem: {fileID: 6448262098318784313}
--- !u!114 &6448262098318784319
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6448262098318784316}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 1

7
Resources/Default_UIEventManager.prefab.meta


fileFormatVersion: 2
guid: 9d3c44d99bbcec1438463a3abcd3ee47
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

24
Runtime/Managers/Implementations/UIEventManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
namespace GameplayIngredients
{
[RequireComponent(typeof(EventSystem))]
[RequireComponent(typeof(StandaloneInputModule))]
[ManagerDefaultPrefab("UIEventManager")]
public class UIEventManager : Manager
{
public EventSystem eventSystem { get { return m_EventSystem; } }
[SerializeField]
private EventSystem m_EventSystem;
private void OnEnable()
{
m_EventSystem = GetComponent<EventSystem>();
}
}
}

11
Runtime/Managers/Implementations/UIEventManager.cs.meta


fileFormatVersion: 2
guid: b5bc0b3023dd1f8439a43adc2d70379f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存