본문 바로가기
728x90

목록238

Unity & C# ~ 시간을 나타내는 법(float to string) float timeValue = 90; // second try { string time1 = string.Format("{0:#0}:{1:00}", Mathf.Floor(timeValue / 60), Mathf.Floor(timeValue) % 60); Debug.Log($"Change time second : {time1}"); } catch(Exception e) { Debug.LogError($"timeValue error {e}"); } try { string time2 = string.Format("{0:00}:{1:00}", Mathf.Floor(timeValue / 60), Mathf.Floor(timeValue) % 60); Debug.Log($"Change time second2 : {.. 2023. 11. 3.
검은사막 ~ 아타니스의 원소 획득처 2023. 9. 23.
Unity & C# ~ 한/영 전환 하는 클래스 using System; using System.Diagnostics; using System.Runtime.InteropServices; public class ImeChange { #region imm32.dll :: Get_IME_Mode IME가져오기 [DllImport("imm32.dll")] public static extern IntPtr ImmGetContext(IntPtr hWnd); [DllImport("imm32.dll")] public static extern bool ImmSetConversionStatus(IntPtr hIMC, int fdwConversion, int fdwSentence); [DllImport("imm32.dll")] private static extern I.. 2023. 6. 29.
라스트오리진) 5-8EX 1인 쫄작 공략 ** 본 배치도는 주관적 의견이기에 참고용도로 활용하시기 바랍니다. 5-8EX에서 풀스쿼드로 1인 쫄작을 하는 공략을 정리하였습니다. - 배치도 - 캐릭터 세팅 - 참고 영상 https://youtu.be/W6BwHvxMuKM 2023. 5. 1.
Unity & C# ~ 이미지 파일을 로드하여 스프라이트로 만들기 (Image file Load to Sprite) - 저장된 이미지 경로를 가지고 이미지를 로드하여 스프라이트로 형 변환을 한 후, 유니티 image ui에 넣기 using System.IO; using UnityEngine; using UnityEngine.UI; public Image image;// unity ui image public string filePath;// image file path public Vector2 imageSize;// image size x : width, y : height public void LoadImage() { byte[] byteTexture = File.ReadAllBytes(filePath);// 파일 불러오기 Texture2D texture2d = new Texture2D((int)imageSize... 2023. 3. 14.
Unity & C# ~ JsonConvert 사용법 using System; using System.IO; using UnityEngine; using Newtonsoft.Json; //serializable data [Serializable] public class TestData { public string testStr; public TestData(string _inputString) { testStr = _inputString; } } public class TestJson : MonoBehaviour { // Start is called before the first frame update void Start() { //load string filePath = Application.dataPath + "/TestData.json"; string.. 2023. 2. 24.
SMALL