폰트 아웃라인 값 수정

앨범 전체화면 모드에서 X 버튼 제거
컨트롤 + 쉬프트 + X 를 누르면 화면 캡쳐
This commit is contained in:
Ino 2025-09-05 06:08:38 +09:00
parent ba7e247077
commit 303ac7895f
7 changed files with 131 additions and 197 deletions

View File

@ -0,0 +1,72 @@
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
public class ScreenshotHelper : MonoBehaviour
{
public static void Capture()
{
if (!Application.isPlaying)
{
UnityEngine.Debug.LogWarning("플레이 모드에서만 가능합니다.");
return;
}
var go = new GameObject("ScreenshotHelper");
go.hideFlags = HideFlags.HideAndDontSave;
go.AddComponent<ScreenshotHelper>();
}
private void Start()
{
StartCoroutine(CaptureCoroutine());
}
private IEnumerator CaptureCoroutine()
{
yield return new WaitForEndOfFrame();
string projectRoot = Path.GetDirectoryName(Application.dataPath);
string screenshotFolder = Path.Combine(projectRoot, "ScreenShot");
if (!Directory.Exists(screenshotFolder))
Directory.CreateDirectory(screenshotFolder);
string fileName = "Screenshot_" + DateTime.Now.ToString("yyyy-MM-dd_HHmmss") + ".png";
string fullPath = Path.Combine(screenshotFolder, fileName);
Texture2D tex = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
tex.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
tex.Apply();
File.WriteAllBytes(fullPath, tex.EncodeToPNG());
Destroy(tex);
UnityEngine.Debug.Log($"[ScreenshotTool] 스크린샷 저장됨: {fullPath}");
// Unity 다이얼로그 띄우기
bool openFolder = EditorUtility.DisplayDialog(
"스크린샷 저장 완료",
$"{fileName}\n파일 위치를 여시겠습니까?",
"예", "아니오");
if (openFolder)
{
// 윈도우 탐색기 열기
Process.Start("explorer.exe", $"/select,\"{fullPath}\"");
}
Destroy(gameObject);
}
}
public static class ScreenshotTool
{
[MenuItem("Tools/Take Screenshot (PlayMode) %#x")]
public static void TakeScreenshotPlayMode()
{
ScreenshotHelper.Capture();
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6e160963f7fea5742a801c1fcfd41391

View File

@ -56520,6 +56520,8 @@ MonoBehaviour:
AINameTMP: {fileID: 1889396053}
t_PointMoney: {fileID: 1964419925}
AIGoldTMP: {fileID: 632370172}
CurMission: 18
CurSubMission: 5
CenterDeckRT: {fileID: 936323066}
FloorRTs:
- {fileID: 1429736703}
@ -98449,138 +98451,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1511115198}
m_CullTransparentMesh: 1
--- !u!1 &1512652386
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1512652387}
- component: {fileID: 1512652390}
- component: {fileID: 1512652389}
- component: {fileID: 1512652388}
m_Layer: 5
m_Name: btn_x
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1512652387
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1512652386}
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: 2024650247}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -50, y: -50}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1512652388
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1512652386}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1512652389}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 2090836414}
m_TargetAssemblyTypeName: ShowPanel, Assembly-CSharp
m_MethodName: OnClick_Btn
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 4
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1512652389
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1512652386}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 21300000, guid: c7be9d948878f3d4abcff3f46819093e, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1512652390
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1512652386}
m_CullTransparentMesh: 1
--- !u!1 &1514929357
GameObject:
m_ObjectHideFlags: 0
@ -159047,7 +158917,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2090836411}
- {fileID: 1512652387}
- {fileID: 2140049025}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -169355,7 +169224,7 @@ MonoBehaviour:
gos_off:
- {fileID: 301590527}
go_btns: {fileID: 2090836410}
go_fullscreenclose: {fileID: 1512652386}
isFull: 0
--- !u!1 &2093703514
GameObject:
m_ObjectHideFlags: 0
@ -175587,7 +175456,7 @@ GameObject:
- component: {fileID: 2140049025}
- component: {fileID: 2140049026}
m_Layer: 5
m_Name: GameObject
m_Name: DragObj
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -175624,6 +175493,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: db478bbe5ace88542969013b0399df6a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowPanel: {fileID: 2090836414}
cam: {fileID: 519420031}
targetSprite: {fileID: 110351319}
go_btnbg: {fileID: 2090836410}

View File

@ -2,6 +2,7 @@ using UnityEngine;
public class CameraDragMove : MonoBehaviour
{
public ShowPanel m_ShowPanel;
public Camera cam; // 이동시킬 카메라
public SpriteRenderer targetSprite; // 영역 기준이 되는 스프라이트
public GameObject go_btnbg;
@ -9,6 +10,7 @@ public class CameraDragMove : MonoBehaviour
private Vector3 lastTouchPos;
private Vector3 pressPos; // 입력 시작 지점
Vector3 lastcamPos;
private bool isDragging = false;
void Reset()
@ -19,76 +21,57 @@ public class CameraDragMove : MonoBehaviour
void Update()
{
#if UNITY_EDITOR || UNITY_STANDALONE
HandleMouseInput(); // 에디터/PC
if (Input.GetMouseButtonDown(0) || Input.GetMouseButton(0) || Input.GetMouseButtonUp(0))
{
ProcessInput(
Input.GetMouseButtonDown(0),
Input.GetMouseButton(0),
Input.GetMouseButtonUp(0),
Input.mousePosition
);
}
#else
HandleTouchInput(); // 모바일
if (Input.touchCount == 1)
{
Touch touch = Input.GetTouch(0);
ProcessInput(
touch.phase == TouchPhase.Began,
touch.phase == TouchPhase.Moved,
touch.phase == TouchPhase.Ended,
touch.position
);
}
#endif
}
void HandleMouseInput()
void ProcessInput(bool began, bool moved, bool ended, Vector3 position)
{
if (Input.GetMouseButtonDown(0))
if (!m_ShowPanel.isFull) return;
if (began)
{
pressPos = Input.mousePosition;
lastTouchPos = Input.mousePosition;
pressPos = position;
lastTouchPos = position;
lastcamPos = cam.transform.position;
isDragging = false;
}
else if (Input.GetMouseButton(0))
else if (moved)
{
Vector3 deltaScreen = Input.mousePosition - pressPos;
Vector3 deltaWorld = cam.ScreenToWorldPoint(position) - cam.ScreenToWorldPoint(lastTouchPos);
deltaWorld.z = 0f;
isDragging = true;
cam.transform.position -= deltaWorld * dragSpeed;
ClampCameraPosition();
if (isDragging)
{
Vector3 deltaWorld = cam.ScreenToWorldPoint(Input.mousePosition) - cam.ScreenToWorldPoint(lastTouchPos);
deltaWorld.z = 0f;
lastTouchPos = position;
cam.transform.position -= deltaWorld * dragSpeed;
ClampCameraPosition();
lastTouchPos = Input.mousePosition;
}
if (lastcamPos != cam.transform.position || Mathf.Abs(deltaWorld.x) >= 0.01f || Mathf.Abs(deltaWorld.y) >= 0.01f)
isDragging = true;
}
else if (Input.GetMouseButtonUp(0))
else if (ended)
{
}
}
void HandleTouchInput()
{
if (Input.touchCount == 1)
{
Touch touch = Input.GetTouch(0);
switch (touch.phase)
{
case TouchPhase.Began:
pressPos = touch.position;
lastTouchPos = touch.position;
isDragging = false;
break;
case TouchPhase.Moved:
Vector3 deltaScreen = (Vector3)touch.position - pressPos;
isDragging = true;
if (isDragging)
{
Vector3 deltaWorld = cam.ScreenToWorldPoint(touch.position) - cam.ScreenToWorldPoint(lastTouchPos);
deltaWorld.z = 0f;
cam.transform.position -= deltaWorld * dragSpeed;
ClampCameraPosition();
lastTouchPos = touch.position;
}
break;
case TouchPhase.Ended:
break;
}
if (!isDragging)
m_ShowPanel.OnClick_Btn(4);
}
}

View File

@ -381,6 +381,7 @@ public partial class GamePanel : MonoBehaviour
void Set_Mission()
{
// 테스트 : 미션 100%
//if (DSUtil.RandomTrue(0.1f + GameManager.DB.MissionAddRate))
if (true)
{

View File

@ -6,8 +6,9 @@ public class ShowPanel : MonoBehaviour
public Camera m_Cam;
public SpriteRenderer i_image;
public GameObject[] gos_off;
public GameObject go_btns, go_fullscreenclose;
public GameObject go_btns;
public bool isFull;
int zoomStep = 0;
public void Set(HuntingData data)
@ -15,9 +16,9 @@ public class ShowPanel : MonoBehaviour
gameObject.SetActive(true);
DSUtil.InActivateGameObjects(gos_off);
go_btns.SetActive(true);
go_fullscreenclose.SetActive(false);
i_image.sprite = data.HuntingImage;
isFull = false;
zoomStep = 0;
m_Cam.orthographicSize = 4f;
m_Cam.transform.position = new Vector3(0f, 0f, -10f);
@ -56,7 +57,7 @@ public class ShowPanel : MonoBehaviour
break;
case 1: // 풀 스크린
go_btns.SetActive(false);
go_fullscreenclose.SetActive(true);
Invoke("Set_Full", Time.deltaTime);
break;
case 2: // 확대 (2단계까지만)
++zoomStep;
@ -70,9 +71,14 @@ public class ShowPanel : MonoBehaviour
m_Cam.transform.position = new Vector3(0f, 0f, -10f);
break;
case 4: // UI 다시 보이기
isFull = false;
go_btns.SetActive(true);
go_fullscreenclose.SetActive(false);
break;
}
}
void Set_Full()
{
isFull = true;
}
}

View File

@ -70,10 +70,10 @@ Material:
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 1
- _OutlineWidth: 0.315
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.53781515
- _ScaleRatioA: 0.8
- _ScaleRatioB: 0.41
- _ScaleRatioC: 0.41
- _ScaleX: 1