본문 바로가기

분류 전체보기127

Unity 3D 날짜 시간 계산 코딩 (DateTime) 광고성 메일 또는 휴대폰 알람등의 야간 전송은 수신자에게 사전 동의를 받아야 하기 때문에 날짜와 시간을 계산하는 방법은 필수다. DateTime StartDate = DateTime.Now; (현재 시간) DateTime EndDate = StartDate.AddDays(+3); //플러스는 다음날, 마이너스는 전날을 의미한다. TimeSpan timeCal = EndDate - StartDate; // TimeSpan을 이용하여 시간차를 계산 할 수 있다. int timeCalDay = timeCal.Days;//날짜 차이 int timeCalHour = timeCal.Hours; //시간차이 int timeCalMinute = timeCal.Minutes;// 분 차이 // String 타입으로 변환.. 2020. 9. 13.
Anti-Cheat Toolkit 2.2.4: InjectionDetector using CodeStage.AntiCheat.Detectors; void Start() { InjectionDetector.AddToSceneOrGetExisting(); InjectionDetector.StartDetection(); } 참조: codestage.net/uas_files/actk/api/class_code_stage_1_1_anti_cheat_1_1_detectors_1_1_injection_detector.html Anti-Cheat Toolkit의 InjectionDetector의 경우 위의 스크립트와 같이 작성하면 실행이 된다. IL2CPP(C++로 변환하는 중간 언어)는 Unity에서 개발한 스크립팅 백엔드로, 여러 플랫폼용 프로젝트를 빌드할 때 Mono 대신 사용할 수 있다... 2020. 9. 12.
Unity 3D Play시 Play중 멈춤 현상 (Freezing) 1. Player가 특정 Object를 인식했을때 Freezing 현상이 발생했다.2. Object를 교체했지만 같은 현상. (특정 모델만 발생함)3.  Is Kinematic이 체크된 Object간 (정상 vs Freezing 유발 비정상 모델) 데이터 값을 비교했을때 Rigibody에 Mass부분에 차이가 있었음. - 그림 2 Mass를 0으로 설정하면 1e-07 값이 나옴.4. 그림 1처럼 변경. Is Kinematic이 설정된 모델의 (Mass 0.1, Drag: 0, Angular Drag 0.05) 후 Freezing 현상이 사라짐.5. 그림 1처럼 is Kinematic이 설정되었고 Mass: 1e-07 이었던 모든 오브첵트를 전부 0.1로 변경하자. Play중 Freezing 현상 뿐만 아.. 2020. 9. 8.
Unity 3d: java.lang.RuntimeException: Duplicate class 원인: 기존 보다 낮은 버전의 JAVA를 설치했을 때 발생한 오류. 해결: 위의 그림과 같은 오류로 빌드가 되지 않았으며, Asset 폴더에서 com.goole.android.play-service-basement 파일을 찾으면 경고와 같이 두개의 파일이 보인다. 낮은 버전을 삭제해주면 문제없이 빌드된다. http://play.google.com/store/apps/details?id=com.wonilmax.bonyonline 러브썸 보니 - Google Play 앱 오픈월드형 3D RPG 게임 play.google.com 2020. 9. 3.
Unity 3D SDK package 에러: getting api levels... 오류명: CommandInvokationFailure: Failed to update Android SDK package list. 1) JDK 버전 문제 JDK가 10 이상 버전에서는 아래 그림1 과 같은 문제가 발생한다고 한다. 기존 버전은 지우고, Java 8버전을 다시 인스톨한 후에 내컴퓨터> 설정> 고급시스템 설정 > 환경 변수를 변경해준다. 그리고, Unity > preference>externaltool에 JDK 부분도 경로를 바꾸어 준다. 2) 이래도 해결이 안됬을 시 모든 Unity 프로그램을 종료한다. Hub까지도 작업관리자에서 완전히 종료. 관리자 모드로 Unity로 들어간 뒤, 아래 그림의 getting Api 부분을 마우스로 클릭해 본다. 그러면 설정이 원래대로 활성화가 된다. 현.. 2020. 9. 3.
Unity 3D (데이터 저장_Application.dataPath) [Unity Editor] Application.dataPath 프로젝트디렉토리/Assets : Unity Editor에 저장할 때 사용한다. -Mobile에서 사용시 아래와 같은 에러가 방생한다. (ioexception cannot create because a file with the same name already exists.) [모바일] Application.persistentDataPath 사용자디렉토리/AppData/LocalLow/회사이름/프로덕트이름 파일 읽기 쓰기 가능 예시) if(Application.isEditor) SAVE_DATA_DIRECTORY = Application.dataPath+ "/Saves/"; else if(Application.isMobilePlatform) S.. 2020. 8. 6.