유니티에서 블루투스 read/write 하기 기본적으로 유니티에서는 블루투스기능이 제공되지 않는다. 궁금한 사항은 메일과 댓글을 통해서 얼마든지 알려주면 공유해드리겠습니다. [에셋 설치 Bluetooth LE for iOS, tvOS and Android] https://assetstore.unity.com/packages/tools/network/bluetooth-le-for-ios-tvos-and-android-26661 Bluetooth LE for iOS, tvOS and Android | 네트워크 | Unity Asset Store Get the Bluetooth LE for iOS, tvOS and Android package from Shatalmic, llc and speed up your..
[unity/score] 스코어 점수 올라가는 로직 구현(with lerf) 1초동안 100점 1초동안 1000점 5초동안 10점 1초동안 10000점 등등 정해진 시간과 점수를 기반으로 로직구현 #에디터 구조 #함수 구현 UI 적용 함수 - ShowScore 로직 구현 - ProgressScore ProgressScore는 Time.deltaTime/duration 로 쪼개어 lerp를 적용하여 구현하였다. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Pool; using UnityEngine.UI; public class CounterManager : MonoBehaviou..
// 1. 현재 시간(Locale) const curr = new Date(); console.log("현재시간(Locale) : " + curr + ' '); // 현재시간(Locale) : Tue May 31 2022 09:00:30 // 2. UTC 시간 계산 const utc = curr.getTime() + (curr.getTimezoneOffset() * 60 * 1000); // 3. UTC to KST (UTC + 9시간) const KR_TIME_DIFF = 9 * 60 * 60 * 1000; //한국 시간(KST)은 UTC시간보다 9시간 더 빠르므로 9시간을 밀리초 단위로 변환. const kr_curr = new Date(utc + (KR_TIME_DIFF)); //UTC 시간을 한국..
-dargSpeed를 통하여 드래그 속도를 조절가능 -loop 가능 -isplay를통한 제어 #이미지시퀀스 드래그 구현 #드래그 설정 #이미지 객체 드래그 영역 구현 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class dragArea : MonoBehaviour, IDragHandler { public int dragSpeed = 100; public gofogoImageSequencer manager; int dragValue = 1; private void Start() { dragValue = dragSpeed; } public v..
[c#/unity] timeline을 이용한 이미지 시퀀스 구현(with c# 컨트롤) #스트리임 시퀀서를 이용하여 구현 -참고- https://docs.unity3d.com/Packages/com.unity.streaming-image-sequence@0.16/manual/index.html Streaming Image Sequence | Streaming Image Sequence | 0.16.0-preview Streaming Image Sequence Streaming Image Sequence is a package for playing sequential image sequences in Unity Timeline easily without making Unity 2D Sprites. It i..
[unity/UniTask] UniTask를 활용하여, 백그라운드에서 리소스 로드하는 방법 일반적으로 async/await를 통하여 비동기 처리를 처리를 하는데, gameobject/texture등 항상 메인쓰레드에서 돌아야하기때문에 비동기처리가 쉽지않다 UniTask를 활용하여 쉽게 해보도록하자 #UniTask UniTask는 유니티용 async-await 통합패키지이다 https://github.com/Cysharp/UniTask #UniTask에 관해 참고하면 좋은 블로그 GitHub - Cysharp/UniTask: Provides an efficient allocation free async/await integration for Unity. Provides an efficient allocat..
[unity/android] 유니티에서 export한 안드로이드 프로젝트 스플레쉬 스크린 없애기(Android 12버전) 유니티 프로젝트는 unityLibrary / launcher 공통 build.gradle(launcher) # implementation 'androidx.core:core-splashscreen:1.0.0-beta02' 추가 # compileSdkVersion 31 추가 dependencies { implementation project(':unityLibrary') implementation 'androidx.core:core-splashscreen:1.0.0-beta02' } android { compileSdkVersion 31 buildToolsVersion '30.0.3' ..
[videoplayer/unity]유니티에서 비디오 플레이 시 전 영상 잠깐(깜빡) 보일때 rendertexture에 이전에 플레이하던 영상의 정보가 남아있어서 그렇다, 연결되어있는 렌더텍스쳐(rendertexture)를 릴리즈시켜주면 버퍼가 비워져서 깔끔하게 해결된다 rendertexture.release(); #rendertexture #videoplayer #unity #release #잔상 #깜빡 #잠깐 보일때 #유니티
#간단하게 안드로이드 환경에서 파일을 저장 및 구현 하는 방법을 알아보자 #헬퍼 클래스를 만들었고, unity package도 github을 통해 제공할 예정 -좌표(회전/위치)를 저장하는 클래스 정의 -로컬 저장소에서 파일을 저장/불러오기 구현 -저장시 object to json, 불러오기 때 json to object 구현 -샘플 파일 생성 #ObjectModel.cs -좌표(회전/위치)를 저장하는 클래스 정의 -오브젝트 모델을 만들어서, 좌표를 저장하는 백터객체를 만들었다. -Vector3를 쓰고싶었으나, json 객체 파싱이 되지 않기때문에 직접 클래스를 만들었다 public class InsObjectModel { public string Name { get; set; } public InsVe..