728x90

๐ŸŽฎ Unity Study 90

[Unity][MenuItem hotkey(shortkey)] %(ctrl, cmd), #(shift), &(alt)...

To create a hotkey, use the following special characters: % (ctrl on Windows and Linux, cmd on macOS), ^ (ctrl on Windows, Linux, and macOS), # (shift), & (alt). If no special modifier key combinations are required, the key can be given after an underscore. For example, to create a menu with the hotkey Shift+Alt+G, use "MyMenu/Do Something #&g". To create a menu with hotkey G and no key modifier..

[C#] using ๋ฌธ

* using ๊ตฌ๋ฌธ: IDisponsable ๊ฐ์ฒด์˜ ์˜ฌ๋ฐ”๋ฅธ ์‚ฌ์šฉ์„ ๋ณด์žฅํ•˜๋Š” ๊ตฌ๋ฌธ. ๋ฉ”๋ชจ๋ฆฌ ๊ด€๋ฆฌ File๋‚˜ Font ๊ฐ™์€ ๊ด€๋ฆฌ๋˜์ง€ ์•Š๋Š” ๋ฆฌ์†Œ์Šค์— ์ ‘๊ทผํ•˜๋Š” ํด๋ž˜์Šค๋“ค์€ ์‚ฌ์šฉ ํ›„์— ๋ฐ˜๋“œ์‹œ ํ•ด์ œ(Disponse) ํ•ด์•ผ ํ•œ๋‹ค. using ๊ตฌ๋ฌธ ์•ˆ์—์„œ ์‚ฌ์šฉํ•˜๋ฉด ๊ฐœ๋ฐœ์ž๊ฐ€ ์ง์ ‘ ์ฒดํฌํ•ด์„œ Disponse ํ•˜์ง€ ์•Š์•„๋„ ๋œ๋‹ค. using ๋ฌธ์„ ๋ฒ—์–ด๋‚˜๋ฉด ์ž๋™์œผ๋กœ ํ•ด์ œ(Disponse) ๋˜์–ด ๊ด€๋ฆฌ๋ฅผ ๋„์™€์ค€๋‹ค. * ์˜ˆ์‹œ var numbers = new List(); using (StreamReader reader = File.OpenText("numbers.txt")) { string line; while ((line = reader.ReadLine()) is not null) { if (int.TryParse(line, out ..

[Unity] Github package npm ๋ฐฐํฌ

*Github Package ? 1. Unity package ๋งŒ๋“ค๊ธฐ package ๋ฅผ github registry ์— publish ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” registry ๋ฅผ ์—ฐ๊ฒฐํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. package ๋ฅผ registry ์— ์—ฐ๊ฒฐํ•˜๋Š” ๋ฒ•์€ ์—ฌ๋Ÿฌ ๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค. ๋‚˜๋Š” unity ํ”„๋กœ์ ํŠธ ์ด๋ฏ€๋กœ Unity Package Manager ๋ฅผ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋Š” package.json ํŒŒ์ผ์„ ์ด์šฉํ–ˆ๋‹ค. package.json ํŒŒ์ผ ์•ˆ์— publishConfig ํ‚ค์›Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•ด์„œ package ๋ฅผ registry ๋ฅผ ์—ฐ๊ฒฐํ•˜๋ฉด ๋œ๋‹ค. "publishConfig": { "registry": "https://npm.pkg.github.com" }, [package ๋งŒ๋“ค ๋•Œ ์ฃผ์˜์‚ฌํ•ญ] 1) package ์ด๋ฆ„(name)๊ณผ ๋ฒ”..

[Unity Error] Sound ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Android ์•ฑ์ด ์•ˆ์ผœ์ง€๋Š” ์—๋Ÿฌ

Unity Android ์•ฑ ์ค‘์— Sound ๊ฐ€ ์‹คํ–‰์ด ์•ˆ๋˜๋ฉฐ ํ™”๋ฉด๋„ ์•ˆ๋‚˜์˜ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. ๋กœ๊ทธ์—” Wifi, casting ๋“ฑ ์—๋Ÿฌ๊ฐ€ ๋‚˜์˜ค๋Š”๋ฐ ์ด ๋ฌธ์ œ๊ฐ€ ์•„๋‹ˆ๊ณ  Audio ๊ฐ€ ๊ฒน์ณ์„œ ์ƒ๊ฒผ๋˜ ์˜ค๋ฅ˜ ๊ฐ™๋‹ค. Unity Player Settings > Other Settings > Mute Other Audio Sources ๋ฅผ ์ฒดํฌ(true)ํ•ด์ค˜์„œ ํ•ด๊ฒฐํ–ˆ๋‹ค. ์†์„ฑ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ์„ค๋ช…์€ ์•„๋ž˜ Document ์ฐธ๊ณ ! https://docs.unity3d.com/ScriptReference/PlayerSettings-muteOtherAudioSources.html Unity - Scripting API: PlayerSettings.muteOtherAudioSources This setting is shared..

[Unity Build Error] BuildPlayerWindowBuildMethods ์—๋Ÿฌ & ํ•ด๊ฒฐ๋ฐฉ๋ฒ•

[์ƒํ™ฉ] Unity 2018.4.31f1 ์—์„œ ์•„๋ž˜์™€ ๊ฐ™์ด Build ์…‹ํŒ… ํ›„ Android ๋นŒ๋“œ ์ค‘ ์•„๋ž˜ ์—๋Ÿฌ ๋ฐœ์ƒ Mono Build ํ•  ๋• ์—๋Ÿฌ๊ฐ€ ์•ˆ๋‚ฌ์—ˆ๋Š”๋ฐ, IL2CPP ๋กœ ๋ฐ”๊พธ๊ณ  ๋นŒ๋“œํ•˜๋‹ˆ ์—๋Ÿฌ๊ฐ€ ๋‚ฌ๋‹ค. ์•„ ๋˜, Runtime Version ์„ .NET 3.5 Equivalent ์ด Deprecated ๋ผ๊ธธ๋ž˜ .NET 4.x Equivalent ๋กœ ๋ณ€๊ฒฝํ•˜๊ธด ํ–ˆ๋‹ค. [์—๋Ÿฌ ๋ฉ”์„ธ์ง€] Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179) UnityEditor.B..

Android API version ๋ณ„ SDK ๋ฒ„์ „(feat. Unity ๋ฒ„์ „ ๋ณ„ NDK, JDK Version)

Andorid 13 -> Android API 33 Andoird 12 -> Andorid API 32, 31 Andorid 11 -> Android API 30 https://developer.android.com/studio/releases/platforms?hl=ko SDK ํ”Œ๋žซํผ ์ถœ์‹œ ๋…ธํŠธ | Android ๊ฐœ๋ฐœ์ž | Android Developers SDK Manager์˜ SDK Platforms ํƒญ์—์„œ ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋Š” SDK ํŒจํ‚ค์ง€์— ๊ด€ํ•œ ์ถœ์‹œ ์ •๋ณด๋ฅผ ํ™•์ธํ•˜์„ธ์š”. developer.android.com https://docs.unity3d.com/Manual/android-sdksetup.html Unity - Manual: Android environment setup Getting st..

[Unity] Custom Unity Package in Git ๋งน๋“ค๊ธฐ

ํšŒ์‚ฌ์—์„œ ํ”„๋กœ์ ํŠธ ๊ฐœ๋ฐœ์‹œ ํ•„์š”ํ•œ ๊ณตํ†ต๋ชจ๋“ˆ์„ ๊ฐ๊ฐ ๋‹ค์šด๋ฐ›์„ ์ˆ˜ ์žˆ๋Š” Editor ํ™”๋ฉด์„ ํ•˜๋‚˜ ๋งŒ๋“ค๊ณ  ์žˆ๋‹ค. ๋‹คํ–‰ํžˆ Unity ์—์„œ Git ์ €์žฅ์†Œ ์ •๋ณด๋ฅผ package.json ํŒŒ์ผ ์•ˆ์— ๋‹ด์•„์„œ ๊ทธ ํŒŒ์ผ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•œ๋‹ค. (Unity Package Manager ์—์„œ Github ์— ์žˆ๋Š” ์˜คํ”ˆ ์†Œ์Šค๋ฅผ Git Url ๋กœ ๋‹ค์šด๋ฐ›์•„๋ณธ ์ ์ด ์žˆ์„ ๊ฒƒ์ด๋‹ค). Unity ์—์„œ ๊ถŒ์žฅํ•˜๋Š” Custom Package ๋ชจ์–‘์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. Unity - Manual: Package layout Adding tests to a package Package layout This is the package layout recommended for custom packages: โ”œโ”€โ”€ package.jso..

[Unity][๋””์ž์ธ ํŒจํ„ด] Builder Pattern(๋นŒ๋” ํŒจํ„ด)

* Builder Pattern: ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ๊ทธ ๊ฐ์ฒด๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๋ถ€๋ถ„ ๋ถ€๋ถ„์„ ๋จผ์ € ์ƒ์„ฑํ•˜๊ณ , ์ด๋ฅผ ์กฐํ•ฉํ•จ์œผ๋กœ์จ ๊ฐ์ฒด ์ „์ฒด๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. * Builder Pattern ๊ณผ Abstract Factroy Pattern ๊ณผ์˜ ์ฐจ์ด์  1) Builder Pattern: ๋ณต์žกํ•œ ๊ฐ์ฒด์˜ ๋‹จ๊ณ„๋ณ„ ์ƒ์„ฑ์— ์ค‘์ ์„ ๋‘๊ณ  ์žˆ๋Š” ํŒจํ„ด. ๋งˆ์ง€๋ง‰ ๋‹จ๊ณ„์—์„œ ์ƒ์„ฑํ•œ ์ œํ’ˆ๋ฐ˜ํ™˜. 2) Abstract Factroy Pattern: ์ œํ’ˆ์˜ ์œ ์‚ฌ๊ตฐ๋“ค์ด ์กด์žฌํ•˜๋Š” ๊ฒฝ์šฐ ์œ ์—ฐํ•œ ์„ค๊ณ„์— ์ค‘์ ์„ ๋‘๋Š” ํŒจํ„ด. ๋‹จ๊ณ„๋งˆ๋‹ค ๋งŒ๋“œ๋Š” ์ œํ’ˆ์„ ์ฆ‰์‹œ ๋ฐ˜ํ™˜. Vehicle(Car, MotorCycle) ๊ฐ์ฒด๋ฅผ ๋งŒ๋“œ๋Š” Builder ํŒจํ„ด์„ ๊ตฌํ˜„ํ•ด๋ณด์ž. ํƒˆ ๊ฒƒ์˜ ๊ณตํ†ต ๋ณ€์ˆ˜์™€ ๊ธฐ๋Šฅ์„ ๊ฐ–๊ณ  ์žˆ๋Š” Vehicle ํด๋ž˜์Šค์™€ Vehicle ์„ ์ง์ ‘ ๋งŒ๋“œ๋Š” ๋ฐ ํ•„์š”ํ•œ In..

[C#] Boxing, Unboxing -> Generic

https://learn.microsoft.com/ko-kr/dotnet/csharp/programming-guide/types/boxing-and-unboxing Boxing ๋ฐ Unboxing - C# ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ฐ€์ด๋“œ - C# C# ํ”„๋กœ๊ทธ๋ž˜๋ฐ์˜ boxing ๋ฐ unboxing์— ๋Œ€ํ•ด ์•Œ์•„๋ด…๋‹ˆ๋‹ค. ์ฝ”๋“œ ์˜ˆ์ œ๋ฅผ ์‚ดํŽด๋ณด๊ณ  ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ถ”๊ฐ€ ๋ฆฌ์†Œ์Šค๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. learn.microsoft.com https://yeko90.tistory.com/entry/c-%EB%B0%95%EC%8B%B1-%EC%96%B8%EB%B0%95%EC%8B%B1-%EA%B0%9C%EB%85%90 [c#] ๋ฐ•์‹ฑ(boxing), ์–ธ๋ฐ•์‹ฑ(unboxing) ๊ฐœ๋…๊ณผ ์‚ฌ์šฉ ์ด์œ  ๊ธฐ์กด์— ํƒ€์ž…์„ ๋ณ€ํ™˜ํ•˜๋Š”๊ฒƒ์„ ํ˜•๋ณ€ํ™˜(type casting)์ด..

[Unity] Url to Image (RawImage, UnityWebRequest, Couroutine, Action<Texture>)

์ด๋ฏธ์ง€ Url ๋ฅผ ๋‹ค์šด๋กœ๋“œํ•ด์„œ ์ด๋ฏธ์ง€ Texture๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๋ฒ•์„ ์•Œ์•„๋ณด์ž. using System; using System.Collections; using TMPro; using UnityEngine; using UnityEngine.Networking; using UnityEngine.UI; namespace Main { public class MainCard : MonoBehaviour { [SerializeField] private TextMeshProUGUI titleText; [SerializeField] private TextMeshProUGUI contentText; [SerializeField] private TextMeshProUGUI dateText; [SerializeField]..

728x90