diff --git a/Assets/AddressableAssetsData/Android/addressables_content_state.bin b/Assets/AddressableAssetsData/Android/addressables_content_state.bin index a3b9af6..07c2c8f 100644 Binary files a/Assets/AddressableAssetsData/Android/addressables_content_state.bin and b/Assets/AddressableAssetsData/Android/addressables_content_state.bin differ diff --git a/Assets/Resources/VersionCode.txt b/Assets/Resources/VersionCode.txt index bf0d87a..7813681 100644 --- a/Assets/Resources/VersionCode.txt +++ b/Assets/Resources/VersionCode.txt @@ -1 +1 @@ -4 \ No newline at end of file +5 \ No newline at end of file diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 35aae29..0d0b30b 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -35585,6 +35585,7 @@ MonoBehaviour: texts: - {fileID: 833058661} - {fileID: 98606680} + - {fileID: 0} m_ScrollRect: {fileID: 1355353690} tf_parent: {fileID: 1201734846} go_chatGirlCard: {fileID: 6396360707933695324, guid: 478c75190a3751c4c8509f0365630070, type: 3} @@ -39814,6 +39815,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1109820679} + - component: {fileID: 1109820683} - component: {fileID: 1109820682} - component: {fileID: 1109820681} - component: {fileID: 1109820680} @@ -39926,7 +39928,19 @@ MonoBehaviour: m_Calls: [] m_OnDeselect: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 1014475707} + m_TargetAssemblyTypeName: ChatUI, Assembly-CSharp + m_MethodName: OnInputDeSelected + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_OnTextSelection: m_PersistentCalls: m_Calls: [] @@ -39935,7 +39949,19 @@ MonoBehaviour: m_Calls: [] m_OnValueChanged: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 1014475707} + m_TargetAssemblyTypeName: ChatUI, Assembly-CSharp + m_MethodName: OnInputChangeValue + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_OnTouchScreenKeyboardStatusChanged: m_PersistentCalls: m_Calls: [] @@ -39995,6 +40021,21 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1109820678} m_CullTransparentMesh: 1 +--- !u!114 &1109820683 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1109820678} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e5497f1d3a4f3224fa357c49ec14d753, type: 3} + m_Name: + m_EditorClassIdentifier: + inputField: {fileID: 1109820680} + canvasRect: {fileID: 456601672} + keyboardHeightRatio: 0.4 --- !u!1 &1112533209 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Chat/ChatUI.cs b/Assets/Scripts/Chat/ChatUI.cs index 0454eb7..dbb4518 100644 --- a/Assets/Scripts/Chat/ChatUI.cs +++ b/Assets/Scripts/Chat/ChatUI.cs @@ -35,6 +35,8 @@ public class ChatUI : MonoBehaviour if (chatdata != null) for (int i = 0; i < chatdata.histories.Count; i++) Set_Chat(chatdata.histories[i]); + else + Make_Today(); } void Set_Money() { texts[1].text = SaveMgr.Ins.Get_Money(eMoney.Chat).ToString(); } @@ -46,6 +48,10 @@ public class ChatUI : MonoBehaviour void Set_Chat(ChatHistory chat) { + DateTime dt = DateTime.Parse(chat.timestamp); + if (dt.Day != InternetTime.Ins.Time.Day) + Make_Today(); + if (chat.role.Equals("assistant")) { var chatscript = DSUtil.Get_Clone(go_chatGirlCard, tf_parent); @@ -63,6 +69,11 @@ public class ChatUI : MonoBehaviour Invoke("Set_ScrollEnd", Time.deltaTime * 5f); } + void Make_Today() + { + list_chat.Add(DSUtil.Get_Clone(go_dayCard, tf_parent)); + } + void Set_ScrollEnd() { m_ScrollRect.verticalNormalizedPosition = 0; diff --git a/Assets/Scripts/Title/TitleInfo.cs b/Assets/Scripts/Title/TitleInfo.cs index a3d3991..2a14c47 100644 --- a/Assets/Scripts/Title/TitleInfo.cs +++ b/Assets/Scripts/Title/TitleInfo.cs @@ -1,3 +1,4 @@ +using OneStore.Common; // 지우면 안됨 using System.Collections; using TMPro; using UnityEngine; @@ -17,7 +18,12 @@ public class TitleInfo : MonoBehaviour IEnumerator Start() { - t_ver.text = DSUtil.Format("{0}({1})", Application.version, "E or G or O"); + t_ver.text = Application.version; +#if UNITY_EDITOR + t_ver.text += "(E)"; +#else + t_ver.text += StoreEnvironment.GetStoreType() == StoreType.ONESTORE ? "(O)" : "(G)"; +#endif label_msg.text = "게임 데이터를 읽고 있습니다."; // 테이블 로딩 기다리기 diff --git a/Assets/Scripts/Util/MobileKeyboardHandlerBottomPivot.cs b/Assets/Scripts/Util/MobileKeyboardHandlerBottomPivot.cs new file mode 100644 index 0000000..5d7810d --- /dev/null +++ b/Assets/Scripts/Util/MobileKeyboardHandlerBottomPivot.cs @@ -0,0 +1,47 @@ +using UnityEngine; +using TMPro; + +public class MobileKeyboardHandlerBottomPivot : MonoBehaviour +{ + public TMP_InputField inputField; + public RectTransform canvasRect; + + private Vector2 originalAnchoredPos; + private RectTransform inputRect; + + [Range(0.2f, 0.5f)] + public float keyboardHeightRatio = 0.35f; + + void Awake() + { + inputRect = inputField.GetComponent(); + originalAnchoredPos = inputRect.anchoredPosition; + + inputField.onSelect.AddListener(OnInputSelected); + inputField.onDeselect.AddListener(OnInputDeselected); + } + + void OnInputSelected(string text) + { + StartCoroutine(MoveInputAboveKeyboard()); + } + + void OnInputDeselected(string text) + { + // 원래 자리로 복원 + inputRect.anchoredPosition = originalAnchoredPos; + } + + System.Collections.IEnumerator MoveInputAboveKeyboard() + { + // 키보드가 뜨는 동안 잠시 대기 + yield return new WaitForSeconds(0.1f); + + float canvasHeight = canvasRect.rect.height; + float estimatedKeyboardHeight = canvasHeight * keyboardHeightRatio; + + Vector2 newPos = inputRect.anchoredPosition; + newPos.y = estimatedKeyboardHeight + inputRect.rect.height + 10; // 10px 여유 + inputRect.anchoredPosition = newPos; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Util/MobileKeyboardHandlerBottomPivot.cs.meta b/Assets/Scripts/Util/MobileKeyboardHandlerBottomPivot.cs.meta new file mode 100644 index 0000000..2bea462 --- /dev/null +++ b/Assets/Scripts/Util/MobileKeyboardHandlerBottomPivot.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e5497f1d3a4f3224fa357c49ec14d753 \ No newline at end of file