[링크] Unity5-AssetBundleSetting
'Unity3D > AssetBundle' 카테고리의 다른 글
| [펌] 에셋번들 생성하기 & 다운로드 (0) | 2017.04.12 |
|---|---|
| [링크] 에셋번들 로딩 방식 4가지 (0) | 2017.03.03 |
| WWW.LoadFromCacheOrDownload (0) | 2015.04.23 |
| AssetBundle 가이드 (0) | 2015.01.26 |
| AssetBundle 버전체크 방식.. (0) | 2014.04.21 |
| [펌] 에셋번들 생성하기 & 다운로드 (0) | 2017.04.12 |
|---|---|
| [링크] 에셋번들 로딩 방식 4가지 (0) | 2017.03.03 |
| WWW.LoadFromCacheOrDownload (0) | 2015.04.23 |
| AssetBundle 가이드 (0) | 2015.01.26 |
| AssetBundle 버전체크 방식.. (0) | 2014.04.21 |
- Unity 5.3 기준 처음보는 Custom Coroutine 이 추가돼 있길래 남겨 놓음
= WaitWhile()
= WaitUntil()
Among all the shiny new features, there is a tiny one line in the Unity 5.3 release notes for a feature that I found useful and I think you will too. Custom coroutines, namely the new CustomYieldInstruction class, mean that you can now add your own coroutine yield operations in a very simple way. So let’s take a look at a real world example.
I was recently investigating a bug in the UI Dropdown component, a Unity 5.2 feature. When Time.timescale was set to 0, the Dropdown component would only work once, then it would not reappear until timescale was set back to a non-zero value.
After a bit of debugging, we found out that the problem is in the Show function.

m_Dropdown is not null and is preventing the Dropdown from being shown.
Once shown, the m_Dropdown component is minimised and then destroyed. Well, it should be destroyed, but when the timescale is 0, this is not happening.
Take a look at the destroy function and see if you can spot the problem.
The title of this article may have given it away, but WaitForSeconds is the answer. WaitForSeconds uses scaled time. This means that if you tell WaitForSeconds to wait for 1 second and the timescale is 0.5, then you actually wait for 2 seconds (1 / 0.5 = 2). So using WaitForSeconds with a timescale of 0 means that you wait indefinitely (until the timescale is not 0). The Dropdown was never being destroyed after its first use, because we would get held up by the WaitForSeconds yield instruction.
We need to wait using unscaled time; the most elegant approach here is to add a new yield operation, a WaitForSecondsRealtime class. Clearly, if our own developers do not realise WaitForSeconds uses scaled time, then we need to address this. WaitForSecondsRealtime should help reinforce this message. We also need to update the docs for WaitForSeconds (we never mention scaled time!).
This is how I discovered the CustomYieldInstruction, recently added for creating new yield operations.
Adding a new yield operation is very simple, here is the solution to our problem.
Any custom yield operation needs to override the keepWaiting property and once we want the yield operation to continue, we just pass back false.
Here is how our fix now looks:
In our example, we grab the real time and just test against it each check. It doesn’t get much simpler than that – oh wait, it does, because we now also have the WaitUntil and WaitWhile yield instructions. With these, we can provide a delegate to be called for our yield instruction test.
Here is an alternative way to solve our problem, assuming we wanted a 5 second delay.
So, a simple feature, but with a lot of potential. I guess the lesson learned here is: Remember to read the release notes, you never know what useful features you might find! If you like the custom coroutines, you should take a look at UnityEvents, another favourite feature of mine that you may have missed.
[출처] http://blogs.unity3d.com/kr/2015/12/01/custom-coroutines/
| [펌] Music player - (load sound files at runtime from directory, and play them) (1) | 2016.09.27 |
|---|---|
| [펌] OnApplicationFocus 와 OnApplicationPause 차이 (0) | 2016.09.22 |
| [펌] 웹서버 구현없이 클라이언트에서 실시간 처리를 해야할때 (0) | 2016.05.23 |
| [펌] 4. Coroutine 구현에 대해서 공부 (0) | 2016.05.11 |
| [펌] Root Motion in Legacy Animation (0) | 2016.03.28 |
유니티 재팬의 keijiro 님이 공개한 텍스쳐 압축 플러그인입니다.
내용으로 보아서 픽셀당 12bits정도의 메모리를 확보할수 있다고 합니다.

압축을 원하는 이미지 파일 이름 확장자 이전에 CP를 붙이면 ChromaPackProcessor에서 자동적으로 아래와 같이 Alpha8 이미지로 바꾸어주는 것을 볼수있습니다.


실제 바이너리를 프로파일링해본건 아니지만 샘플 이미지 기준
원본 텍스쳐 : 256 256 ARGB 32 bit = 256.0KB
압축된 텍스쳐 : 384 256 Alpha 8 = 96.0KB
그리고 크게 눈에 띄지는 않지만 아래의 이미지를 보시면 머리카락 부분에 계단지는 현상이 나타나기도 합니다. (상 : 오리지날 텍스쳐 하 : ChromaPack이 적용된 텍스쳐)

사실 크게 눈에 띄지않고 용량 대비 좋은 퀄리티를 내는 건 사실이기 때문에 true color 텍스쳐를 적용하길 원하시는 분들은 한번쯤 적용해봐도 괜찮은 플러그인인것같습니다.
Git hub : https://github.com/keijiro/ChromaPack
| [링크] APK용량 줄이기, 이미지 압축 (0) | 2016.08.09 |
|---|---|
| [펌] BPM 계산 방식과 배속의 구현 방법 (0) | 2016.07.30 |
| [펌] 유니티 ChromaPack 텍스처 압축 (0) | 2016.07.04 |
| [펌] 개선된 디더링 방식 (16비트 텍스쳐) dither4444 (0) | 2016.07.04 |
| Unity Job Process (0) | 2016.06.27 |
손실 텍스처 압축 플러그인
* 이미지의 1픽셀당 12비트 메모리 절약
* 기존 유니티 16bit rgba 비해 절반 가량 절약
* ChromaPack 전용 쉐이더 사용
https://github.com/keijiro/ChromaPack
결론
용량 대비 품질이 좋음
텍스쳐 크기 변화에 따른 UV 문제는 없음
전용쉐이더를 써야하는 불편함
품질 손실을 감안 한다면 ETC2 4bits / ETC2 8bits 선택은 여전히 유효
품질 때문에 RGBA16bit/RGB 24bit 를 사용해야한다면 Chromapack 유효
(간혹, 알파 빗금이 1픽셀 보이는 문제가 있음. 쉐이더에서 좌표 수정해서 사용하심)
[출처]
| [펌] BPM 계산 방식과 배속의 구현 방법 (0) | 2016.07.30 |
|---|---|
| [펌] Unity3d 텍스쳐 압축 플러그인 ChromaPack (2) | 2016.07.04 |
| [펌] 개선된 디더링 방식 (16비트 텍스쳐) dither4444 (0) | 2016.07.04 |
| Unity Job Process (0) | 2016.06.27 |
| [펌] 윈도우 빌드시 해상도 선택 다이얼로그 안나오게 하는 방법 (0) | 2016.06.14 |
디더링 방식의 변화로 16비트 이미지 변화 비교
* 스크립트를 적용하여 디더링 방식을 바꾸는 형태
* 적용하기 쉬움
* 모든 이미지가 위처럼 좋아지는 것은 아님 (점박이 노이즈 압박;;)
* 그라데이션 표현을 살리고 싶을 때 좋을 듯
* 귀찮더라도 Chromapack 사용한다면 패스~ (용량과 품질이 chromapack 압도)
https://github.com/keijiro/unity-dither4444
[출처]
| [펌] Unity3d 텍스쳐 압축 플러그인 ChromaPack (2) | 2016.07.04 |
|---|---|
| [펌] 유니티 ChromaPack 텍스처 압축 (0) | 2016.07.04 |
| Unity Job Process (0) | 2016.06.27 |
| [펌] 윈도우 빌드시 해상도 선택 다이얼로그 안나오게 하는 방법 (0) | 2016.06.14 |
| [UNITY & IOS] WWW auto caching 문제 해결하기 (Cache-Control) (0) | 2016.05.19 |
Window > Lighting > Lightmaps > Uncheck Auto.
[출처] http://answers.unity3d.com/questions/945639/a-unity-job-process-is-taking-up-95-of-my-physical.html
| [펌] 유니티 ChromaPack 텍스처 압축 (0) | 2016.07.04 |
|---|---|
| [펌] 개선된 디더링 방식 (16비트 텍스쳐) dither4444 (0) | 2016.07.04 |
| [펌] 윈도우 빌드시 해상도 선택 다이얼로그 안나오게 하는 방법 (0) | 2016.06.14 |
| [UNITY & IOS] WWW auto caching 문제 해결하기 (Cache-Control) (0) | 2016.05.19 |
| [펌] Application.LoadLevel(string) is obsolete 마이그레이션 (0) | 2016.05.16 |
| [Asset] 2D Outline (0) | 2018.05.21 |
|---|---|
| [Unity] Google Play Game Service 연동시키기 (0) | 2016.07.26 |
| [Link] Visualizer Studio (0) | 2016.06.21 |
| [Link] Unity 3 Audio Spectrum Analysis (0) | 2016.06.21 |
| [링크] Unity3D 일일 자동 빌드 하기 (0) | 2016.06.14 |
| [Unity] Google Play Game Service 연동시키기 (0) | 2016.07.26 |
|---|---|
| [Link] RhythmTool (0) | 2016.06.21 |
| [Link] Unity 3 Audio Spectrum Analysis (0) | 2016.06.21 |
| [링크] Unity3D 일일 자동 빌드 하기 (0) | 2016.06.14 |
| Unity Cloud Data 소개 (0) | 2015.01.20 |
| [Link] RhythmTool (0) | 2016.06.21 |
|---|---|
| [Link] Visualizer Studio (0) | 2016.06.21 |
| [링크] Unity3D 일일 자동 빌드 하기 (0) | 2016.06.14 |
| Unity Cloud Data 소개 (0) | 2015.01.20 |
| unity3d grid (0) | 2014.12.19 |
| [Link] Visualizer Studio (0) | 2016.06.21 |
|---|---|
| [Link] Unity 3 Audio Spectrum Analysis (0) | 2016.06.21 |
| Unity Cloud Data 소개 (0) | 2015.01.20 |
| unity3d grid (0) | 2014.12.19 |
| Tree Pack(FBX) (0) | 2014.09.03 |