본문 바로가기

프로그래밍280

구글 Firebase 리얼타임 디비 https://firebase.google.com/docs?authuser=0&hl=ko 문서 | Firebase Firebase SDK 참조, 통합 가이드, 샘플 코드, 라이브러리 firebase.google.com https://firebase.google.com/docs/database/unity/start?authuser=0&hl=ko Unity용 Firebase 실시간 데이터베이스 시작하기 | Firebase Documentation 의견 보내기 Unity용 Firebase 실시간 데이터베이스 시작하기 Firebase 실시간 데이터베이스는 NoSQL 클라우드 데이터베이스를 사용하여 데이터를 저장하고 동기화합니다. 모든 클라이언트에서 실시간 firebase.google.com using Syste.. 2022. 7. 8.
UGUI Advanced (Dynamic) ScrollView 일반화된 명칭이 없지만 이 스크롤의 용도는 수십 개 이상의 항목을 가진 리스트를 실제 그 개수 만큼의 아이템을 만들지 않고 적은 개수 를 만들지만 표시할건 다 하면서 부하가 없이 표시해주는 것이 되겠다 https://assetstore.unity.com/packages/tools/gui/dynamic-scrollview-101107 Dynamic ScrollView | GUI 도구 | Unity Asset Store Use the Dynamic ScrollView from mosframe on your next project. Find this GUI tool & more on the Unity Asset Store. assetstore.unity.com 일단 이걸 추가한 다음... 특정 위치로 스크롤은.. 2022. 6. 18.
버프 시스템 클래스 using System; using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; public struct BuffData { public Soul owner; public float lifeTime; public Action onEnd; public BuffData(Soul owner, float lifeTime, Action onEnd) { this.owner = owner; this.lifeTime = lifeTime; this.onEnd = onEnd; } } pub.. 2022. 5. 27.
GitHub Copilot GitHub Copilot 을 시작하려면 시작하기 가이드를 방문하세요 https://github.com/github/copilot-docs/blob/main/docs/README.md#getting-started GitHub - github/copilot-docs: Documentation for GitHub Copilot Documentation for GitHub Copilot. Contribute to github/copilot-docs development by creating an account on GitHub. github.com 더 많은 리소스를 보려면 설명서 리포지토리 를 방문하세요. https://github.com/github/copilot-docs GitHub - github/cop.. 2022. 3. 30.
유니티쨩 URP 를 써보자 https://unity-chan.com/ UNITY-CHAN! OFFICIAL WEBSITE ユニティちゃん公式ウェブサイトです。ユニティちゃんの各種データダウンロードやイベント、最新情報などをお届けします。 unity-chan.com ㄴ 받는 곳 그냥 압축 풀어서 덮어써도 상관은 없는데 안드 로이드 빌드할 때 문제가 생긴다 그걸 막기 위해 서는 1. Assets 안에 있는거만 내 Assets 안에 복사 2. Packages 안에 [ UnityChanSpringBone-release-1.1 ] [ UnityChanToonShaderVer2_Project-urp-2.4.0 ] 2개의 폴더가 있는데 이걸 복사해서 내 Packages 폴더 로 복사하고 각각 안에 Editor 라는 폴더는 따로 잘라 내서 Assets/Ed.. 2022. 3. 21.
ObscuredString / String 을 숫자로 변환 했을 때의 성능 using System.Diagnostics; using System.Numerics; using CodeStage.AntiCheat.ObscuredTypes; using UnityEngine; using Debug = UnityEngine.Debug; public class Test_Obscured : MonoBehaviour { private BigInteger m_Value1 = 100000; private BigInteger m_Value2 = 1000; private ObscuredString m_ObsValue1 = "100000"; private ObscuredString m_ObsValue2 = "1000"; private string m_StrValue1 = "100000"; privat.. 2022. 3. 4.
제트브레인 라이더(Rider) 코파일럿(Copilot) 사용법 https://github.com/github/copilot-docs/blob/main/docs/jetbrains/gettingstarted.md#getting-started-with-github-copilot-in-jetbrains GitHub - github/copilot-docs: Documentation for GitHub Copilot Documentation for GitHub Copilot. Contribute to github/copilot-docs development by creating an account on GitHub. github.com 2022. 2. 21.
C# 가상함수(Virtual)와 오버라이드(override) public class View_Base : MonoBehaviour { [SerializeField] protected Text m_Text_Title; virtual void Init() { } } public class View_Character : View_Base { override void Init() { m_Text_Title.text = "캐릭터"; } } public class View_Inventory : View_Base { override void Init() { m_Text_Title.text = "인벤토리"; } } 이런식으로 UI 베이스를 만들고 같은 형식의 캐릭창과 인벤창을 만든다 치면 베이스에서 공통된 것 (창 타이틀 이름이라던가 닫기 버 튼 같은 것들) 을 편리하게 관리할.. 2022. 1. 14.
Unity - Obfuscator 메뉴얼 Obfuscator Assets/Editor/Beebyte/Obfuscator/ObfuscatorOptions.asset 파일을 클릭해보면 Button 더 강력한 난독화를 위해 프로그래밍 방식으로 버튼 클릭을 할당하는 것을 고려하십시오. using UnityEngine; using UnityEngine.UI; using Beebyte.Obfuscator; public class Buds : MonoBehaviour { public Button Button; public void Start() { Button.onClick.AddListener(CodedClick); } //Assigned in the Start() method private void CodedClick() //This gets obfus.. 2021. 12. 30.
스크롤 뷰 (Scroll View) 만들기 1. 만들어야 할 위치(GameObject)에 우클릭 UI/Scroll View 선택 스크롤 방향에 따라 Horizontal (좌우) Vertical (상하) 박스 체크 화면에 보여질 사이즈 Width, Height 에 입력 2. 스크롤 바 a. 만들어진 GameObject 를 펼쳐보면 Scrollbar Horizontal 과 Scrollbar Vertical 이 있는데 옆 아래 스크롤바 이므로 안쓸 경우 그냥 삭제 b. Scroll View 컴포넌트를 보면 Horizontal, Vertical Scrollbar 가 Missing 으로 표시 될테니 하나씩 선택하고 delete 키를 눌러 정리 c. Viewport 에서 Right Bottom 값 17 씩 스크롤 바 간격을 벌 려 놓은 것을 0 으로 수정 .. 2021. 12. 27.
Unity - Anti-Cheat Toolkit 메뉴얼 Hey there! Anti-Cheat Toolkit(ACTk)을 구입해 주셔서 대단히 감사합니다. Unity를 위한 종합적인 치트 방지 솔루션! DISCLAIMER: 이 플러그인에 사용된 치트 방지 기술은 가장하지 않습니다. 100% 안전하고 깨지지 않도록(불가능 클라이언트 측에서) 대부분의 사기꾼이 시도하는 것을 중지해야 합니다. 그래도 앱을 해킹하려면 명심하십시오: 동기 부여가 잘 됨 숙련된 해커는 무엇이든 부술 수 있습니다! Installation and setup 새 버전을 프로젝트로 가져오기 전에 다음을 방지하기 위해 이전 버전을 완전히 제거하는 것을 고려하십시오. 새 버전에서 가능한 파일 및 폴더 구조 변경으로 인한 모든 문제. 프로젝트에 플러그인을 가져온 후 추가 설정 및 제어를 위한 새 .. 2021. 12. 20.
Unity - n초 마다 실행시키기 매니저 만들다보면 꼭 몇 초에 한번 뭐를 체크해야 하거나 그럴 때가 있다 -_- 쉽게는 Invoke 나 Coroutine 쓰면 되지만 이런 애들은 관리가 필요하고 관리하고 싶지 않은데 관리해야 된 다면- 대략 제작 해보자면 using System; using System.Collections.Generic; public class ActionPerSecData { public delegate void Action(); public float m_Sec { private set; get; } public float m_CurSec = 0.0f; public Delegate m_Action; public ActionPerSecData(float sec, Delegate action) { m_Sec = sec; m_.. 2021. 11. 19.
Unity 어드레서블 통빌드(풀빌드) 시 주의 어드레서블 에셋 통이나 풀이냐 뭐 그런걸 떠나서 어드레서블 에셋 빌드를 한번도 안하고 apk 빌드를 하면 실행하자 마자 에러를 만나게 됩니다 MissingMethodException: Default constructor not found for type UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[[UnityEngine.Sprite, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) (at :0) 2021. 10. 28.
C# Action<> 의 활용 using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class Test_ClassA { public void Run(string value) { Debug.Log($"Test_ClassA.Run : {value}"); } } public class Test_ClassB { public event Action m_Run; public void Run(string value) { m_Run?.Invoke(value); } } public class Test_Callback : MonoBehaviour { private Test_ClassA m_A = new Test_ClassA();.. 2021. 10. 15.
Unity 일정 시간 동안 목표 위치까지 이동 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enable_Move : MonoBehaviour { private Vector3 m_Position_Default; [SerializeField] protected Vector3 m_Position_End; [SerializeField] protected float m_RunTime = 1.0f; private void Awake() { m_Position_Default = transform.position; } private void OnEnable() { StartCoroutine(Run(m_RunTime)); .. 2021. 10. 5.
퀘스트 시스템 feat linq lookup using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class QuestInfo { public int m_Type; } public class QuestData : MonoBehaviour { private Dictionary m_Dic = new Dictionary(); private void Awake() { m_Dic.Add("Kill_Monster", new QuestInfo() { m_Type = 0 }); m_Dic.Add("Kill_Monster_Daily", new QuestInfo() { m_Type = 0 }); m_Dic.A.. 2021. 9. 29.
KeyCode.BackQuote = = ` KeyCode.BackQuote ! 옆에 있는 ` 버튼 키 2021. 9. 27.
BigInteger x ratio or percent using System.Collections; using System.Collections.Generic; using UnityEngine; public class Test_BigInteger : MonoBehaviour { public System.Numerics.BigInteger m_Damage = 1000000000000000; // 10000000000000000000 public float m_Ratio = 1.1f; // Start is called before the first frame update void Start() { CalcR(m_Damage, m_Ratio); CalcR(100, m_Ratio); CalcR(60000000, m_Ratio); CalcR(3422346435, m.. 2021. 9. 23.
.Net 4.0 https://docs.microsoft.com/ko-kr/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and- https://docs.microsoft.com/ko-kr/dotnet/csharp/whats-new/csharp-7 C# 7.0의 새로운 기능 - C# 가이드 C# 언어 버전 7.0의 새로운 기능을 살펴봅니다. docs.microsoft.com 2021. 9. 14.
txt 파일 생성 using System.IO; public void MakeTextFile(string name, List list) { var filePath = $"{Application.dataPath}/{name}.txt"; Debug.Log($"### SAVE @ {filePath}"); StreamWriter fileWriter = File.CreateText(filePath); for (int i = 0; i < list.Count; i++) { Debug.Log((string)list[i]); fileWriter.WriteLine((string)list[i]); } fileWriter.Close(); } assets/패스 경로에 생깁니다 2021. 9. 9.