From 5d28e1ffb564df72cd206d4622aa14cde62626ea Mon Sep 17 00:00:00 2001 From: Leinadix <79761215+Leinadix@users.noreply.github.com> Date: Wed, 17 Sep 2025 17:26:16 +0200 Subject: [PATCH] nacho detection + pixel --- Assets/Earth/EarthScene.unity | 630 ++++++++++++++++++++++----- Assets/NodeMaterialHover.mat | 138 ++++++ Assets/NodeMaterialHover.mat.meta | 8 + Assets/Pixellated.renderTexture | 39 ++ Assets/Pixellated.renderTexture.meta | 8 + Assets/Prefabs/Point.prefab | 7 +- Assets/Scripts/CameraOrbit.cs | 12 + Assets/Scripts/GameManager.cs | 17 + Assets/Scripts/Node.cs | 112 ++++- ProjectSettings/TagManager.asset | 29 +- 10 files changed, 847 insertions(+), 153 deletions(-) create mode 100644 Assets/NodeMaterialHover.mat create mode 100644 Assets/NodeMaterialHover.mat.meta create mode 100644 Assets/Pixellated.renderTexture create mode 100644 Assets/Pixellated.renderTexture.meta diff --git a/Assets/Earth/EarthScene.unity b/Assets/Earth/EarthScene.unity index d3f9fe2..84eec22 100644 --- a/Assets/Earth/EarthScene.unity +++ b/Assets/Earth/EarthScene.unity @@ -17489,12 +17489,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 8.175111, y: 18.691149, z: 2.0145864} - - {x: 7.4201374, y: 18.816559, z: 3.3359883} - - {x: 6.623993, y: 18.837559, z: 4.6388793} - - {x: 5.7910933, y: 18.754036, z: 5.916032} - - {x: 4.9260616, y: 18.566456, z: 7.1603575} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 8.175112, y: 18.691149, z: 2.014586} + - {x: 7.4201384, y: 18.816559, z: 3.3359876} + - {x: 6.6239944, y: 18.837559, z: 4.638878} + - {x: 5.7910953, y: 18.754036, z: 5.9160295} + - {x: 4.926064, y: 18.566456, z: 7.160355} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -19667,11 +19667,11 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 14.520694, y: 14.461042, z: 0.5270029} - - {x: 13.507401, y: 15.41047, z: 0.56347626} - - {x: 12.432094, y: 16.289145, z: 0.59736246} - - {x: 11.299705, y: 17.09303, z: 0.6285061} - - {x: 10.115435, y: 17.818438, z: 0.65676403} - - {x: 8.884723, y: 18.462034, z: 0.6820065} + - {x: 13.507401, y: 15.41047, z: 0.5634762} + - {x: 12.432094, y: 16.289145, z: 0.5973624} + - {x: 11.299705, y: 17.09303, z: 0.628506} + - {x: 10.115435, y: 17.818438, z: 0.65676385} + - {x: 8.884723, y: 18.462034, z: 0.6820063} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -21734,6 +21734,108 @@ LineRenderer: m_UseWorldSpace: 1 m_Loop: 0 m_ApplyActiveColorSpace: 1 +--- !u!1 &312098842 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 312098846} + - component: {fileID: 312098845} + - component: {fileID: 312098844} + - component: {fileID: 312098843} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &312098843 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312098842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &312098844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312098842} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &312098845 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312098842} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &312098846 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 312098842} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 996544023} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} --- !u!1 &314255635 GameObject: m_ObjectHideFlags: 0 @@ -22476,12 +22578,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 14.513823, y: 14.172317, z: 2.9570763} - - {x: 13.260203, y: 15.446398, z: 2.4136653} - - {x: 11.89646, y: 16.592197, z: 1.8502089} - - {x: 10.433918, y: 17.600199, z: 1.2713866} - - {x: 8.884721, y: 18.462032, z: 0.68200576} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 14.513824, y: 14.172317, z: 2.9570763} + - {x: 13.260205, y: 15.446397, z: 2.4136653} + - {x: 11.896462, y: 16.592197, z: 1.8502092} + - {x: 10.433919, y: 17.600199, z: 1.2713876} + - {x: 8.884724, y: 18.462032, z: 0.68200666} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -23436,6 +23538,152 @@ Material: - _RendererColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 +--- !u!1 &343335075 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 343335076} + - component: {fileID: 343335080} + - component: {fileID: 343335079} + - component: {fileID: 343335078} + - component: {fileID: 343335077} + m_Layer: 0 + m_Name: Pixel + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &343335076 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 343335075} + serializedVersion: 2 + 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: 1249182055} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &343335077 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 343335075} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 +--- !u!81 &343335078 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 343335075} + m_Enabled: 1 +--- !u!124 &343335079 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 343335075} + m_Enabled: 1 +--- !u!20 &343335080 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 343335075} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: 1 + m_TargetTexture: {fileID: 8400000, guid: b1cd15e52e623714b8923607fff80958, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 --- !u!21 &344733549 Material: serializedVersion: 8 @@ -36827,12 +37075,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 8.914363, y: 18.38562, z: 1.6592633} - - {x: 8.923601, y: 18.267134, z: 2.6327226} - - {x: 8.912417, y: 18.106838, z: 3.6001573} - - {x: 8.880839, y: 17.905111, z: 4.559353} - - {x: 8.828936, y: 17.662405, z: 5.5081143} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 8.914363, y: 18.38562, z: 1.6592621} + - {x: 8.923602, y: 18.267134, z: 2.6327207} + - {x: 8.912417, y: 18.106842, z: 3.600154} + - {x: 8.880838, y: 17.905113, z: 4.5593486} + - {x: 8.828936, y: 17.662407, z: 5.5081096} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -40708,11 +40956,11 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} + - {x: 15.646909, y: 12.780539, z: 3.475929} - {x: 15.458863, y: 13.149572, z: 2.891763} - {x: 15.251955, y: 13.502558, z: 2.3040683} - - {x: 15.026436, y: 13.83907, z: 1.7135624} - - {x: 14.782583, y: 14.158695, z: 1.1209652} + - {x: 15.026436, y: 13.83907, z: 1.7135621} + - {x: 14.782583, y: 14.158695, z: 1.1209651} - {x: 14.520693, y: 14.461044, z: 0.52700037} m_Parameters: serializedVersion: 3 @@ -41012,11 +41260,11 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 8.570779, y: 18.401255, z: 2.8610551} - - {x: 8.157912, y: 18.128092, z: 5.0070815} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 8.57078, y: 18.401255, z: 2.861055} + - {x: 8.157913, y: 18.128092, z: 5.0070815} - {x: 7.650886, y: 17.645693, z: 7.0953164} - - {x: 7.055555, y: 16.95963, z: 9.101657} + - {x: 7.055555, y: 16.95963, z: 9.101658} - {x: 6.378788, y: 16.07782, z: 11.002948} m_Parameters: serializedVersion: 3 @@ -46384,9 +46632,9 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 15.148402, y: 12.9489355, z: 4.806347} - - {x: 14.576113, y: 13.054264, z: 6.113355} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 15.148402, y: 12.9489355, z: 4.8063464} + - {x: 14.576113, y: 13.054264, z: 6.113354} - {x: 13.932828, y: 13.09601, z: 7.390587} - {x: 13.2216835, y: 13.073971, z: 8.631823} - {x: 12.44614, y: 12.988254, z: 9.831015} @@ -49472,9 +49720,9 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 16.316082, y: 11.796306, z: 3.8577988} - - {x: 16.9246, y: 10.768219, z: 4.2253265} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 16.316082, y: 11.796306, z: 3.8577983} + - {x: 16.9246, y: 10.768219, z: 4.225326} - {x: 17.470198, y: 9.7001, z: 4.577146} - {x: 17.950848, y: 8.59592, z: 4.9119496} - {x: 18.364763, y: 7.4597826, z: 5.2284923} @@ -49969,12 +50217,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 15.122936, y: 13.546136, z: 2.8370779} - - {x: 14.553306, y: 14.270832, z: 2.1896605} - - {x: 13.939736, y: 14.952444, z: 1.5356325} - - {x: 13.2840805, y: 15.588914, z: 0.8769683} - - {x: 12.588318, y: 16.178314, z: 0.21565567} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 15.122936, y: 13.546136, z: 2.8370776} + - {x: 14.553306, y: 14.270832, z: 2.1896603} + - {x: 13.939736, y: 14.952446, z: 1.5356323} + - {x: 13.2840805, y: 15.588914, z: 0.876968} + - {x: 12.588318, y: 16.178314, z: 0.21565536} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -55337,12 +55585,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 16.083271, y: 12.31908, z: 3.1334758} - - {x: 16.499708, y: 11.842361, z: 2.7871406} - - {x: 16.895704, y: 11.35097, z: 2.437352} - - {x: 17.270767, y: 10.845517, z: 2.0845442} - - {x: 17.624437, y: 10.326629, z: 1.7291535} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 16.083271, y: 12.31908, z: 3.1334755} + - {x: 16.499708, y: 11.8423605, z: 2.78714} + - {x: 16.895704, y: 11.35097, z: 2.4373517} + - {x: 17.270767, y: 10.845517, z: 2.0845437} + - {x: 17.624437, y: 10.326629, z: 1.7291533} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -57787,11 +58035,11 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} + - {x: 15.646909, y: 12.780539, z: 3.475929} - {x: 15.760122, y: 12.409893, z: 4.226476} - - {x: 15.846579, y: 12.018178, z: 4.9698477} + - {x: 15.846579, y: 12.018178, z: 4.969847} - {x: 15.906129, y: 11.606057, z: 5.7047806} - - {x: 15.938674, y: 11.17423, z: 6.430028} + - {x: 15.938674, y: 11.174231, z: 6.430028} - {x: 15.944158, y: 10.723432, z: 7.144359} m_Parameters: serializedVersion: 3 @@ -61077,12 +61325,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 7.448569, y: 19.097145, z: -0.26066747} - - {x: 5.952959, y: 19.579819, z: -1.2012607} - - {x: 4.4098306, y: 19.906199, z: -2.132265} - - {x: 2.8315034, y: 20.073689, z: -3.046249} - - {x: 1.2305723, y: 20.080942, z: -3.935917} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 7.4485693, y: 19.097145, z: -0.26066768} + - {x: 5.952959, y: 19.579819, z: -1.2012609} + - {x: 4.4098306, y: 19.9062, z: -2.132265} + - {x: 2.8315034, y: 20.073689, z: -3.0462496} + - {x: 1.2305717, y: 20.080942, z: -3.9359176} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -72426,6 +72674,78 @@ Material: - _RendererColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 +--- !u!1 &996544022 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 996544023} + - component: {fileID: 996544025} + - component: {fileID: 996544024} + m_Layer: 5 + m_Name: RawImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &996544023 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996544022} + 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: 312098846} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &996544024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996544022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Texture: {fileID: 8400000, guid: b1cd15e52e623714b8923607fff80958, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &996544025 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996544022} + m_CullTransparentMesh: 1 --- !u!1 &998654226 GameObject: m_ObjectHideFlags: 0 @@ -78152,11 +78472,11 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 11.036027, y: 16.993761, z: 3.1093743} - - {x: 10.630453, y: 17.33007, z: 2.6290877} - - {x: 10.212023, y: 17.645422, z: 2.1456223} - - {x: 9.781242, y: 17.93943, z: 1.6595614} - - {x: 9.338631, y: 18.211744, z: 1.1714934} - - {x: 8.884725, y: 18.462032, z: 0.6820085} + - {x: 10.630454, y: 17.33007, z: 2.6290886} + - {x: 10.212025, y: 17.64542, z: 2.145624} + - {x: 9.781245, y: 17.93943, z: 1.6595639} + - {x: 9.338635, y: 18.211742, z: 1.171497} + - {x: 8.884731, y: 18.462029, z: 0.6820126} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -79066,12 +79386,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 9.387679, y: 18.120638, z: 1.9401076} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 9.387679, y: 18.120638, z: 1.9401073} - {x: 9.847024, y: 17.695063, z: 3.1891959} - {x: 10.260622, y: 17.18728, z: 4.423468} - - {x: 10.626554, y: 16.599655, z: 5.63719} - - {x: 10.943117, y: 15.934912, z: 6.824724} + - {x: 10.626554, y: 16.599655, z: 5.6371903} + - {x: 10.943116, y: 15.934912, z: 6.8247247} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -80551,12 +80871,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} + - {x: 15.646909, y: 12.780539, z: 3.475929} - {x: 16.079329, y: 11.688531, z: 5.008337} - {x: 16.36912, y: 10.492845, z: 6.49632} - {x: 16.513712, y: 9.204083, z: 7.926677} - {x: 16.511822, y: 7.8336773, z: 9.286724} - - {x: 16.363468, y: 6.3937855, z: 10.564394} + - {x: 16.363466, y: 6.3937864, z: 10.564394} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -89294,6 +89614,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 764178570} + - {fileID: 343335076} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1249182056 @@ -91144,6 +91465,85 @@ LineRenderer: m_UseWorldSpace: 1 m_Loop: 0 m_ApplyActiveColorSpace: 1 +--- !u!1 &1277702116 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1277702119} + - component: {fileID: 1277702118} + - component: {fileID: 1277702117} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1277702117 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277702116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_MoveRepeatDelay: 0.5 + m_MoveRepeatRate: 0.1 + m_XRTrackingOrigin: {fileID: 0} + m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_DeselectOnBackgroundClick: 1 + m_PointerBehavior: 0 + m_CursorLockBehavior: 0 + m_ScrollDeltaPerTick: 6 +--- !u!114 &1277702118 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277702116} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1277702119 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1277702116} + serializedVersion: 2 + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1278420943 GameObject: m_ObjectHideFlags: 0 @@ -95479,11 +95879,11 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 8.365842, y: 18.676586, z: 1.203297} - - {x: 7.8352757, y: 18.86505, z: 1.7229068} - - {x: 7.2937636, y: 19.027163, z: 2.24011} - - {x: 6.7420654, y: 19.162699, z: 2.754184} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 8.365843, y: 18.676586, z: 1.2032968} + - {x: 7.835276, y: 18.86505, z: 1.7229065} + - {x: 7.2937646, y: 19.027163, z: 2.2401094} + - {x: 6.7420654, y: 19.162699, z: 2.7541835} - {x: 6.1809483, y: 19.271467, z: 3.2644105} m_Parameters: serializedVersion: 3 @@ -102397,31 +102797,31 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalPosition.x - value: 0.17921834 + value: 0.17921835 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalPosition.y - value: 15.811039 + value: 15.811041 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalPosition.z - value: 12.246586 + value: 12.246588 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.w - value: 0.8978443 + value: 0.89784414 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.x - value: -0.4401926 + value: -0.44019264 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.y - value: 0.008109838 + value: 0.008109807 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.z - value: 0.006362956 + value: 0.0063629216 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -106341,8 +106741,8 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 14.472342, y: 13.972715, z: 3.9451964} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 14.472342, y: 13.972715, z: 3.945196} - {x: 13.193735, y: 15.064445, z: 4.386102} - {x: 11.820281, y: 16.047876, z: 4.7954774} - {x: 10.361853, y: 16.915945, z: 5.170378} @@ -115458,8 +115858,8 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 14.821708, y: 13.5293455, z: 4.186145} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 14.821708, y: 13.5293455, z: 4.1861444} - {x: 13.934923, y: 14.22194, z: 4.8789663} - {x: 12.990244, y: 14.855446, z: 5.5515175} - {x: 11.9915905, y: 15.427229, z: 6.2010026} @@ -118496,10 +118896,10 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} + - {x: 15.646909, y: 12.780539, z: 3.475929} - {x: 15.503062, y: 12.289933, z: 5.372392} - {x: 15.216894, y: 11.686504, z: 7.2195363} - - {x: 14.791035, y: 10.975792, z: 9.000404} + - {x: 14.791035, y: 10.975792, z: 9.000403} - {x: 14.22939, y: 10.164321, z: 10.698646} - {x: 13.537118, y: 9.25954, z: 12.298674} m_Parameters: @@ -118952,8 +119352,8 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 15.646909, y: 12.780539, z: 3.4759293} - - {x: 14.829323, y: 13.732846, z: 3.4278502} + - {x: 15.646909, y: 12.780539, z: 3.475929} + - {x: 14.829323, y: 13.732846, z: 3.4278498} - {x: 13.956065, y: 14.633598, z: 3.3669028} - {x: 13.030417, y: 15.479415, z: 3.2933154} - {x: 12.055854, y: 16.267122, z: 3.2073655} @@ -123867,12 +124267,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 7.57343, y: 18.994596, z: 1.4486191} - - {x: 6.2154484, y: 19.410063, z: 2.206301} - - {x: 4.8191485, y: 19.705864, z: 2.9503808} - - {x: 3.3931394, y: 19.88018, z: 3.6762724} - - {x: 1.9462119, y: 19.93194, z: 4.3795} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 7.5734305, y: 18.994596, z: 1.4486189} + - {x: 6.2154493, y: 19.410063, z: 2.2063007} + - {x: 4.819149, y: 19.705864, z: 2.9503808} + - {x: 3.39314, y: 19.88018, z: 3.6762729} + - {x: 1.9462125, y: 19.93194, z: 4.3794994} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -124864,12 +125264,12 @@ LineRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_Positions: - - {x: 8.884723, y: 18.462032, z: 0.6820065} - - {x: 7.9466352, y: 18.838963, z: 1.481383} - - {x: 6.977137, y: 19.141432, z: 2.2749043} - - {x: 5.98006, y: 19.368242, z: 3.0594335} - - {x: 4.9593477, y: 19.518496, z: 3.83187} - - {x: 3.919032, y: 19.5916, z: 4.58916} + - {x: 8.884724, y: 18.462032, z: 0.68200624} + - {x: 7.946636, y: 18.838963, z: 1.4813827} + - {x: 6.977138, y: 19.141432, z: 2.274904} + - {x: 5.9800615, y: 19.368242, z: 3.0594332} + - {x: 4.959348, y: 19.518496, z: 3.8318696} + - {x: 3.9190328, y: 19.5916, z: 4.58916} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -139782,11 +140182,11 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 12.588318, y: 16.178312, z: 0.21565716} - - {x: 11.888418, y: 16.69788, z: 0.3104058} - - {x: 11.166772, y: 17.186903, z: 0.40458664} - - {x: 10.424694, y: 17.644482, z: 0.49802724} - - {x: 9.663548, y: 18.069786, z: 0.5905568} - - {x: 8.884725, y: 18.46203, z: 0.68200606} + - {x: 11.888418, y: 16.69788, z: 0.31040576} + - {x: 11.166772, y: 17.186903, z: 0.4045866} + - {x: 10.424694, y: 17.644482, z: 0.4980272} + - {x: 9.663548, y: 18.069786, z: 0.59055674} + - {x: 8.884725, y: 18.46203, z: 0.682006} m_Parameters: serializedVersion: 3 widthMultiplier: 1 @@ -141129,15 +141529,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalPosition.x - value: -1.8932574 + value: -1.8932575 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalPosition.y - value: 8.969068 + value: 8.969069 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalPosition.z - value: 17.775583 + value: 17.775585 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.w @@ -141145,15 +141545,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.x - value: -0.22935383 + value: -0.22935377 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.y - value: -0.054837853 + value: -0.054837935 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalRotation.z - value: -0.02590293 + value: -0.025902938 objectReference: {fileID: 0} - target: {fileID: 7965170655419664431, guid: 6fa1678ce2080e44ca5b11723d197651, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -141840,9 +142240,9 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 17.177565, y: 10.989216, z: -2.1020052} - - {x: 16.988894, y: 11.430499, z: -0.9854772} - - {x: 16.740519, y: 11.831605, z: 0.13451417} - - {x: 16.43331, y: 12.191134, z: 1.2540337} + - {x: 16.988894, y: 11.430499, z: -0.98547715} + - {x: 16.740519, y: 11.831605, z: 0.13451432} + - {x: 16.43331, y: 12.191134, z: 1.2540333} - {x: 16.068344, y: 12.507816, z: 2.3691442} - {x: 15.646907, y: 12.780539, z: 3.4759293} m_Parameters: @@ -145746,3 +146146,5 @@ SceneRoots: - {fileID: 1284417481} - {fileID: 383244312} - {fileID: 1383367511} + - {fileID: 312098846} + - {fileID: 1277702119} diff --git a/Assets/NodeMaterialHover.mat b/Assets/NodeMaterialHover.mat new file mode 100644 index 0000000..c497e3c --- /dev/null +++ b/Assets/NodeMaterialHover.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: NodeMaterialHover + m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BlendOp: 0 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _SampleGI: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0, g: 1, b: 0.9167206, a: 1} + - _Color: {r: 0, g: 1, b: 0.91672057, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &2322949267982861053 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 9 diff --git a/Assets/NodeMaterialHover.mat.meta b/Assets/NodeMaterialHover.mat.meta new file mode 100644 index 0000000..adcb8be --- /dev/null +++ b/Assets/NodeMaterialHover.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b1674e8dbc8b67648ad5ede0c4e347a8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Pixellated.renderTexture b/Assets/Pixellated.renderTexture new file mode 100644 index 0000000..c0994d5 --- /dev/null +++ b/Assets/Pixellated.renderTexture @@ -0,0 +1,39 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Pixellated + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_IsAlphaChannelOptional: 0 + serializedVersion: 6 + m_Width: 320 + m_Height: 180 + m_AntiAliasing: 8 + m_MipCount: -1 + m_DepthStencilFormat: 94 + m_ColorFormat: 8 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_UseDynamicScaleExplicit: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 0 + m_Aniso: 0 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 diff --git a/Assets/Pixellated.renderTexture.meta b/Assets/Pixellated.renderTexture.meta new file mode 100644 index 0000000..4de0f31 --- /dev/null +++ b/Assets/Pixellated.renderTexture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b1cd15e52e623714b8923607fff80958 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Point.prefab b/Assets/Prefabs/Point.prefab index bc19a80..8b5790f 100644 --- a/Assets/Prefabs/Point.prefab +++ b/Assets/Prefabs/Point.prefab @@ -14,7 +14,7 @@ GameObject: - component: {fileID: 1163466899257774620} m_Layer: 0 m_Name: Sphere - m_TagString: Untagged + m_TagString: Node m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -120,7 +120,7 @@ GameObject: - component: {fileID: 6619618649642168463} m_Layer: 0 m_Name: Point - m_TagString: Untagged + m_TagString: Node m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 @@ -157,3 +157,6 @@ MonoBehaviour: materialOwnerSelf: {fileID: 2100000, guid: 06d3b3201213c004a95a21afd8cdeb93, type: 2} materialOwnerOther: {fileID: 2100000, guid: 6fd755fe2122d2443a364b2c2a3a8291, type: 2} materialOwnerNone: {fileID: 2100000, guid: c670d9c5cf5963b4e9ca485b3528ea58, type: 2} + materialHover: {fileID: 2100000, guid: b1674e8dbc8b67648ad5ede0c4e347a8, type: 2} + connected: [] + hovered: 0 diff --git a/Assets/Scripts/CameraOrbit.cs b/Assets/Scripts/CameraOrbit.cs index 0098ca2..e33160c 100644 --- a/Assets/Scripts/CameraOrbit.cs +++ b/Assets/Scripts/CameraOrbit.cs @@ -55,5 +55,17 @@ public class CameraOrbit : MonoBehaviour transform.rotation = rotation; transform.position = position; + + Ray ray = transform.GetChild(0).GetComponent().ScreenPointToRay(Input.mousePosition); + RaycastHit hit; + + if (Physics.Raycast(ray, out hit, float.MaxValue)) + { + if (hit.transform.CompareTag("Node")) + { + var obj = hit.transform.parent.GetComponent(); + obj.hovered = true; + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index b901448..3f926fd 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -38,6 +38,19 @@ public class GameManager : MonoBehaviour public bool allowed = true; public bool hovered = false; public LineRenderer lineRenderer; + + public void SetConnect() + { + if (!allowed) return; + nodeA.connected.Add(nodeB); + nodeB.connected.Add(nodeA); + } + + public void DelConnect() + { + nodeA.connected.Remove(nodeB); + nodeB.connected.Remove(nodeA); + } } [Serializable] @@ -77,6 +90,10 @@ public class GameManager : MonoBehaviour if (Application.isPlaying) DontDestroyOnLoad(gameObject); + + connections.ForEach(obj => obj.DelConnect()); + connections.ForEach(obj => obj.SetConnect()); + } public void GenerateAlongSphere() diff --git a/Assets/Scripts/Node.cs b/Assets/Scripts/Node.cs index 4ae81d3..985007e 100644 --- a/Assets/Scripts/Node.cs +++ b/Assets/Scripts/Node.cs @@ -1,3 +1,6 @@ +using System; +using System.Collections.Generic; +using System.Linq; using UnityEngine; using System.Collections.Generic; @@ -7,8 +10,11 @@ public class Node : MonoBehaviour [Range(-1, 1)] [SerializeField] public int Owner = -1; - public Material materialOwnerSelf, materialOwnerOther, materialOwnerNone; + public Material materialOwnerSelf, materialOwnerOther, materialOwnerNone, materialHover; + public List connected; + + public bool hovered; void Awake() { @@ -18,12 +24,22 @@ public class Node : MonoBehaviour // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { - } // Update is called once per frame void Update() { + + + if (Input.GetMouseButtonDown(0) && hovered) + { + var count = CycleFinder.FindLargestCycleAmongNeighbors(this); + + Debug.Log($"Largest Nacho: {count.Count}"); + } + + + UpdateColor(); UpdateTransform(); } @@ -36,33 +52,107 @@ public class Node : MonoBehaviour private void OnDestroy() { GameManager gm = FindFirstObjectByType(); - + List looseConnections = gm.connections.FindAll(c => c.nodeA == this || c.nodeB == this); - foreach(GameManager.Connection c in looseConnections) + foreach (GameManager.Connection c in looseConnections) { DestroyImmediate(c.lineRenderer.gameObject); gm.connections.Remove(c); } - + gm.FetchAllNodes(); } public void UpdateTransform() { transform.localPosition = transform.localPosition.normalized * 20f; - if(transform.position != Vector3.zero) + if (transform.position != Vector3.zero) transform.forward = transform.position; } public void UpdateColor() { - switch (Owner) + if (hovered) { - case -1: transform.GetChild(0).GetComponent().sharedMaterial = materialOwnerNone; break; - case 0: transform.GetChild(0).GetComponent().sharedMaterial = materialOwnerSelf; break; - case 1: transform.GetChild(0).GetComponent().sharedMaterial = materialOwnerOther; break; + transform.GetChild(0).GetComponent().sharedMaterial = materialHover; } + else + { + switch (Owner) + { + case -1: transform.GetChild(0).GetComponent().sharedMaterial = materialOwnerNone; break; + case 0: transform.GetChild(0).GetComponent().sharedMaterial = materialOwnerSelf; break; + case 1: transform.GetChild(0).GetComponent().sharedMaterial = materialOwnerOther; break; + } + } + + hovered = false; + } + +} + + +public class CycleFinder +{ + private HashSet allowedNodes; + private List bestCycle; + private Node centerNode; + + public CycleFinder(Node center) + { + centerNode = center; + allowedNodes = new HashSet(center.connected); + bestCycle = new List(); + } + + public static List FindLargestCycleAmongNeighbors(Node center) + { + var finder = new CycleFinder(center); + return finder.FindBestCycle(); + } + + private List FindBestCycle() + { + // Versuche von jedem Nachbarknoten aus einen Zyklus zu finden + foreach (var startNode in allowedNodes) + { + var visited = new HashSet(); + var currentPath = new List(); + + SearchForCycles(startNode, startNode, visited, currentPath); + } + + return bestCycle; } -} + private void SearchForCycles(Node startNode, Node currentNode, HashSet visited, List path) + { + // Aktuellen Knoten zum Pfad hinzufugen + path.Add(currentNode); + visited.Add(currentNode); + + // Durchsuche alle Verbindungen des aktuellen Knotens + foreach (var neighbor in currentNode.connected) + { + // Nur Nachbarn des Zentralknotens sind erlaubt + if (!allowedNodes.Contains(neighbor)) + continue; + + // Wenn wir zum Startknoten zuruckgekehrt sind und mindestens 3 Knoten im Pfad haben + if (neighbor == startNode && path.Count >= 3) + { + // Geschlossenen Zyklus gefunden - prufe ob er besser ist + if (path.Count > bestCycle.Count) + { + bestCycle = new List(path); + } + } + // Wenn der Knoten noch nicht besucht wurde, setze die Suche fort + else if (!visited.Contains(neighbor)) + { + SearchForCycles(startNode, neighbor, new HashSet(visited), new List(path)); + } + } + } +} \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 6413d11..ef806e7 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -2,8 +2,9 @@ %TAG !u! tag:unity3d.com,2011: --- !u!78 &1 TagManager: - serializedVersion: 2 - tags: [] + serializedVersion: 3 + tags: + - Node layers: - Default - TransparentFX @@ -50,27 +51,3 @@ TagManager: - Light Layer 5 - Light Layer 6 - Light Layer 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -