diff --git a/Assets/Prefabs/Enemies/Enemy.prefab b/Assets/Prefabs/Enemies/Enemy.prefab index 604a179..c8620a9 100644 --- a/Assets/Prefabs/Enemies/Enemy.prefab +++ b/Assets/Prefabs/Enemies/Enemy.prefab @@ -97,6 +97,7 @@ GameObject: - component: {fileID: 6292430518164601119} - component: {fileID: 4916122593163076045} - component: {fileID: 4754634268177203569} + - component: {fileID: 8144049354800009867} m_Layer: 0 m_Name: Canvas m_TagString: Untagged @@ -122,7 +123,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0.3, y: 0.1} + m_SizeDelta: {x: 0.09375, y: 0.03125} m_Pivot: {x: 0.5, y: 0.5} --- !u!223 &4915168525079258058 Canvas: @@ -144,8 +145,8 @@ Canvas: m_VertexColorAlwaysGammaSpace: 0 m_AdditionalShaderChannelsFlag: 0 m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: -344656299 - m_SortingOrder: 0 + m_SortingLayerID: 0 + m_SortingOrder: -1 m_TargetDisplay: 0 --- !u!114 &6292430518164601119 MonoBehaviour: @@ -199,6 +200,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a3cef6d37caa7c467b68369285a9ac2a, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &8144049354800009867 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5644288195509349706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 69f5c09eeecd84ead8942fef17e479ad, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &5654329235174420066 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Utilities/CanvasToView.cs b/Assets/Scripts/Utilities/CanvasToView.cs new file mode 100644 index 0000000..64aa5bf --- /dev/null +++ b/Assets/Scripts/Utilities/CanvasToView.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CanvasToView : MonoBehaviour +{ + Camera mainCam; + Canvas canvas; + void Awake() + { + mainCam = Camera.main; + canvas = GetComponent(); + } + private void Update() + { + canvas.transform.LookAt(mainCam.transform.position); + } +} diff --git a/Assets/Scripts/Utilities/CanvasToView.cs.meta b/Assets/Scripts/Utilities/CanvasToView.cs.meta new file mode 100644 index 0000000..6ccbefd --- /dev/null +++ b/Assets/Scripts/Utilities/CanvasToView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 69f5c09eeecd84ead8942fef17e479ad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: