diff --git a/Assets/Scenes/EOS-DEMO.unity b/Assets/Scenes/EOS-DEMO.unity index bd2471a..d0b0950 100644 --- a/Assets/Scenes/EOS-DEMO.unity +++ b/Assets/Scenes/EOS-DEMO.unity @@ -145,11 +145,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalPosition.z - value: 0 + value: -5.27 objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalRotation.x @@ -157,7 +157,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalRotation.z @@ -169,7 +169,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: 180 objectReference: {fileID: 0} - target: {fileID: 3760069271783454130, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} propertyPath: m_LocalEulerAnglesHint.z @@ -179,6 +179,10 @@ PrefabInstance: propertyPath: m_Name value: M290 objectReference: {fileID: 0} + - target: {fileID: 5083529091832326733, guid: 1ece8d9795430044b973ea109aa2e2ae, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -276,6 +280,79 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1731100016 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1731100018} + - component: {fileID: 1731100017} + - component: {fileID: 1731100019} + m_Layer: 5 + m_Name: UIDocument + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1731100017 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731100016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PanelSettings: {fileID: 11400000, guid: f19292bf374b992479f09f7d2719e519, type: 2} + m_ParentUI: {fileID: 0} + sourceAsset: {fileID: 9197481963319205126, guid: 21b744987daefbe4289982ff67e79b06, type: 3} + m_SortingOrder: 0 +--- !u!4 &1731100018 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731100016} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1731100019 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1731100016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ad4ca7716c7aea04b8f96e9bf0843041, type: 3} + m_Name: + m_EditorClassIdentifier: + nextButtonChannel: {fileID: 11400000, guid: 648f6d9dcf9343447b8eac905a58a9f2, type: 2} + previousButtonChannel: {fileID: 11400000, guid: f6b9fd324bc8e644e9e56225fb808557, type: 2} + videoButtonChannel: {fileID: 11400000, guid: 5f0e125edc29a27498f2b25e2d70ec50, type: 2} + documentButtonChannel: {fileID: 11400000, guid: 2f4e1ff067796664d89d93ea9df58429, type: 2} + animationButtonChannel: {fileID: 11400000, guid: d5a1bf35195ba7b4db4a17cdf65ec340, type: 2} + stepChangeChannel: {fileID: 11400000, guid: d1c3fee5a7e29bf49b295b270071caac, type: 2} + machineChannel: {fileID: 11400000, guid: 54b15bb1b3f88434ab913e2d728f8d8a, type: 2} + playButtonChannel: {fileID: 11400000, guid: 1e7cb77f67abfa642bee4a266170308e, type: 2} + stopButtonChannel: {fileID: 11400000, guid: a2ad816fb5e06f142a29e4cf5d7b4bb2, type: 2} + documentPanelAsset: {fileID: 9197481963319205126, guid: 413ef8e025c819a4388d5e6847910e88, type: 3} + videoPanelAsset: {fileID: 9197481963319205126, guid: be9d38649b53ad04a9a049af60582111, type: 3} + videoTexture: {fileID: 8400000, guid: 26357abaed907a140b413474e327b173, type: 2} --- !u!1 &1910209661 GameObject: m_ObjectHideFlags: 0 @@ -380,6 +457,10 @@ GameObject: m_Component: - component: {fileID: 2078256972} - component: {fileID: 2078256973} + - component: {fileID: 2078256974} + - component: {fileID: 2078256976} + - component: {fileID: 2078256975} + - component: {fileID: 2078256977} m_Layer: 0 m_Name: Managers m_TagString: Untagged @@ -419,3 +500,82 @@ MonoBehaviour: stepChangeChannel: {fileID: 11400000, guid: d1c3fee5a7e29bf49b295b270071caac, type: 2} nextStepChannel: {fileID: 11400000, guid: 648f6d9dcf9343447b8eac905a58a9f2, type: 2} previousStepChannel: {fileID: 11400000, guid: f6b9fd324bc8e644e9e56225fb808557, type: 2} +--- !u!114 &2078256974 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2078256970} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 163672e7a74f797458f938b4a0ce1556, type: 3} + m_Name: + m_EditorClassIdentifier: + machine: {fileID: 11400000, guid: c82f6d52c5b533748832f0cd8dbfff44, type: 2} + machineChangeChannel: {fileID: 11400000, guid: 54b15bb1b3f88434ab913e2d728f8d8a, type: 2} +--- !u!114 &2078256975 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2078256970} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 80f0c7388d126454b8c5a8832e34c6b9, type: 3} + m_Name: + m_EditorClassIdentifier: + stepChangeChannel: {fileID: 11400000, guid: d1c3fee5a7e29bf49b295b270071caac, type: 2} +--- !u!114 &2078256976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2078256970} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d42e5f473144c2b4f9500453eefd0812, type: 3} + m_Name: + m_EditorClassIdentifier: + videoPlayer: {fileID: 2078256977} + stepChangeChannel: {fileID: 11400000, guid: d1c3fee5a7e29bf49b295b270071caac, type: 2} + playChannel: {fileID: 11400000, guid: 1e7cb77f67abfa642bee4a266170308e, type: 2} + stopChannel: {fileID: 11400000, guid: a2ad816fb5e06f142a29e4cf5d7b4bb2, type: 2} +--- !u!328 &2078256977 +VideoPlayer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2078256970} + m_Enabled: 1 + m_VideoClip: {fileID: 0} + m_TargetCameraAlpha: 1 + m_TargetCamera3DLayout: 0 + m_TargetCamera: {fileID: 0} + m_TargetTexture: {fileID: 8400000, guid: 26357abaed907a140b413474e327b173, type: 2} + m_TimeReference: 0 + m_TargetMaterialRenderer: {fileID: 0} + m_TargetMaterialProperty: + m_RenderMode: 2 + m_AspectRatio: 2 + m_DataSource: 0 + m_TimeUpdateMode: 2 + m_PlaybackSpeed: 1 + m_AudioOutputMode: 2 + m_TargetAudioSources: + - {fileID: 0} + m_DirectAudioVolumes: + - 1 + m_Url: + m_EnabledAudioTracks: 01 + m_DirectAudioMutes: 00 + m_ControlledAudioTrackCount: 1 + m_PlayOnAwake: 0 + m_SkipOnDrop: 1 + m_Looping: 0 + m_WaitForFirstFrame: 1 + m_FrameReadyEventEnabled: 0 + m_VideoShaders: [] diff --git a/Assets/Scripts/Managers/CurrentStepManager.cs b/Assets/Scripts/Managers/CurrentStepManager.cs index 57eed06..080668e 100644 --- a/Assets/Scripts/Managers/CurrentStepManager.cs +++ b/Assets/Scripts/Managers/CurrentStepManager.cs @@ -11,11 +11,6 @@ namespace Managers [SerializeField] private StepChangeChannelSO stepChangeChannel; [SerializeField] private SimpleChannelSO nextStepChannel; [SerializeField] private SimpleChannelSO previousStepChannel; - - public void Start() - { - OnMachineChanged(); - } private void OnEnable() { diff --git a/Assets/Scripts/Managers/DocumentManager.cs b/Assets/Scripts/Managers/DocumentManager.cs index a71287b..0224985 100644 --- a/Assets/Scripts/Managers/DocumentManager.cs +++ b/Assets/Scripts/Managers/DocumentManager.cs @@ -1,12 +1,13 @@ using SO; using SO.Channels; using UnityEngine; +using UnityEngine.UIElements; namespace Managers { public class DocumentManager : MonoBehaviour { - [SerializeField] private Material displayImage; + [SerializeField] private Image displayImage; [SerializeField] private StepChangeChannelSO stepChangeChannel; private const string MainText = "_MainTex"; private static readonly int MainTex = Shader.PropertyToID(MainText); @@ -18,7 +19,8 @@ namespace Managers private void OnStepChanged(StepSO step) { - displayImage.SetTexture(MainTex, step.Document); + // displayImage.SetTexture(MainTex, step.Document); + displayImage.image = step.Document; } } } diff --git a/Assets/Scripts/Startup.cs b/Assets/Scripts/Startup.cs new file mode 100644 index 0000000..b0dc2f6 --- /dev/null +++ b/Assets/Scripts/Startup.cs @@ -0,0 +1,16 @@ +using System.Collections; +using System.Collections.Generic; +using SO; +using SO.Channels; +using UnityEngine; + +public class Startup : MonoBehaviour +{ + [SerializeField] private MachineSO machine; + [SerializeField] private MachineChangeChannelSO machineChangeChannel; + void Start() + { + machineChangeChannel.RaiseEvent(machine); + + } +} diff --git a/Assets/Scripts/Startup.cs.meta b/Assets/Scripts/Startup.cs.meta new file mode 100644 index 0000000..9c4a212 --- /dev/null +++ b/Assets/Scripts/Startup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 163672e7a74f797458f938b4a0ce1556 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI Toolkit.meta b/Assets/UI Toolkit.meta new file mode 100644 index 0000000..13656f5 --- /dev/null +++ b/Assets/UI Toolkit.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 87959fb97d5af534a8c759c9418a7432 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI Toolkit/PanelSettings.asset b/Assets/UI Toolkit/PanelSettings.asset new file mode 100644 index 0000000..c9a0ffb --- /dev/null +++ b/Assets/UI Toolkit/PanelSettings.asset @@ -0,0 +1,38 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} + m_Name: PanelSettings + m_EditorClassIdentifier: + themeUss: {fileID: -4733365628477956816, guid: bde7dadb40fcda546a19ef78c07d679c, type: 3} + m_TargetTexture: {fileID: 0} + m_ScaleMode: 2 + m_ReferenceSpritePixelsPerUnit: 100 + m_Scale: 1 + m_ReferenceDpi: 96 + m_FallbackDpi: 96 + m_ReferenceResolution: {x: 1200, y: 800} + m_ScreenMatchMode: 0 + m_Match: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 + m_ClearDepthStencil: 1 + m_ClearColor: 0 + m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0} + m_DynamicAtlasSettings: + m_MinAtlasSize: 64 + m_MaxAtlasSize: 4096 + m_MaxSubTextureSize: 64 + m_ActiveFilters: -1 + m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} + m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} + m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} + textSettings: {fileID: 0} diff --git a/Assets/UI Toolkit/PanelSettings.asset.meta b/Assets/UI Toolkit/PanelSettings.asset.meta new file mode 100644 index 0000000..c716c48 --- /dev/null +++ b/Assets/UI Toolkit/PanelSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f19292bf374b992479f09f7d2719e519 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI Toolkit/UnityThemes.meta b/Assets/UI Toolkit/UnityThemes.meta new file mode 100644 index 0000000..b8ce765 --- /dev/null +++ b/Assets/UI Toolkit/UnityThemes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a5962f1a0095e314f854d829fd97ee5a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss b/Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss new file mode 100644 index 0000000..1056e07 --- /dev/null +++ b/Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss @@ -0,0 +1 @@ +@import url("unity-theme://default"); \ No newline at end of file diff --git a/Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss.meta b/Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss.meta new file mode 100644 index 0000000..022c875 --- /dev/null +++ b/Assets/UI Toolkit/UnityThemes/UnityDefaultRuntimeTheme.tss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bde7dadb40fcda546a19ef78c07d679c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 diff --git a/Assets/UI.meta b/Assets/UI.meta new file mode 100644 index 0000000..40d4ce0 --- /dev/null +++ b/Assets/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86b980b870502164f94b18f1e7b54d8e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/UI/DocumentScreen.uxml b/Assets/UI/DocumentScreen.uxml new file mode 100644 index 0000000..e2b87fa --- /dev/null +++ b/Assets/UI/DocumentScreen.uxml @@ -0,0 +1,5 @@ + + + + + diff --git a/Assets/UI/DocumentScreen.uxml.meta b/Assets/UI/DocumentScreen.uxml.meta new file mode 100644 index 0000000..c2de4f8 --- /dev/null +++ b/Assets/UI/DocumentScreen.uxml.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 413ef8e025c819a4388d5e6847910e88 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Assets/UI/MainMenuLayout.cs b/Assets/UI/MainMenuLayout.cs new file mode 100644 index 0000000..290cc44 --- /dev/null +++ b/Assets/UI/MainMenuLayout.cs @@ -0,0 +1,191 @@ +using System.Collections; +using System.Collections.Generic; +using SO; +using SO.Channels; +using UnityEngine; +using UnityEngine.Serialization; +using UnityEngine.UI; +using UnityEngine.UIElements; +using Button = UnityEngine.UIElements.Button; +using Image = UnityEngine.UIElements.Image; + +public class MainMenuLayout : MonoBehaviour +{ + [SerializeField] private SimpleChannelSO nextButtonChannel; + [SerializeField] private SimpleChannelSO previousButtonChannel; + [SerializeField] private SimpleChannelSO videoButtonChannel; + [SerializeField] private SimpleChannelSO documentButtonChannel; + [SerializeField] private SimpleChannelSO animationButtonChannel; + [SerializeField] private StepChangeChannelSO stepChangeChannel; + [SerializeField] private MachineChangeChannelSO machineChannel; + [SerializeField] private SimpleChannelSO playButtonChannel; + [SerializeField] private SimpleChannelSO stopButtonChannel; + + [SerializeField] private VisualTreeAsset documentPanelAsset; + [SerializeField] private VisualTreeAsset videoPanelAsset; + + [SerializeField] private RenderTexture videoTexture; + + private VisualElement switchingArea; + private Button nextButton; + private Button previousButton; + private Button videoButton; + private Button documentButton; + private Button animationButton; + + private Label machineName; + private Label processName; + private Label stepName; + + private Label stepNameText; + private Label stepDescriptionText; + + private VisualElement videoScreen; + private VisualElement documentScreen; + private VisualElement documentPanel; + private Texture currentDocument; + + private Button playButton; + private Button stopButton; + + private void OnEnable() + { + var root = GetComponent().rootVisualElement; + machineName = root.Q