블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00

UNITY가 Play도중에 죽는 경우가 자주 발생하기 때문에 아래와 같이 Play를 감지하여 Assets을 저장하도록 하면 저장을 하지 못해서 편집한 내용이 유실되는 상황을 방지 할 수 있다.

using System.Collections;
using UnityEditor;
using UnityEngine;
 
[InitializeOnLoad]
public class SaveAssets
{
	static SaveAssets()
	{
		EditorApplication.playmodeStateChanged = () =>
		{
			if (EditorApplication.isPlayingOrWillChangePlaymode)
			{
				EditorApplication.SaveAssets();
			}
		};
	}
}
 



[출처]

http://www.antegg.com/wiki/doku.php?id=note:unity_3d:%EC%97%90%EB%94%94%ED%84%B0%EC%97%90%EC%84%9C_%EA%B2%8C%EC%9E%84_%ED%94%8C%EB%A0%88%EC%9D%B4%EB%A5%BC_%ED%95%A0_%EB%95%8C_%EC%A0%80%EC%9E%A5%EB%90%98%EC%A7%80_%EC%95%8A%EC%9D%80_assets_%EC%A0%80%EC%9E%A5%ED%95%98%EA%B8%B0


[참조]

https://docs.unity3d.com/ScriptReference/EditorApplication.SaveAssets.html

반응형
Posted by blueasa
, |

사이시옷은, 순우리말로 된 합성어나 순우리말과 한자어로 된 합성어에서, 앞말이 모음으로 끝나고, 뒷말의 첫소리가 된소리로 나거나 ‘ㄴ’ 또는 ‘ㄴㄴ’소리가 덧나는 경우와 두 음절로 된 한자어 중 ‘곳간(庫間), 셋방(貰房,) 숫자(數字), 찻간(車間), 툇간(退間), 횟수(回數)’에만 받치어 적습니다. 


‘최솟값, 최댓값’은 순우리말과 한자어로 된 합성어이고, 앞말이 모음으로 끝나며, 뒷말의 첫소리가 된소리로 나므로, 사이시옷을 받치어 적지만, ‘개수’는 위에서 언급한 사이시옷을 받치어 적는 환경에 해당하지 않으므로, ‘개수’로 적습니다.


(관련 규정: '한글 맞춤법' 제4장 제4절 제30항)




[출처] http://krdic.naver.com/rescript_detail.nhn?seq=6577

반응형

'한글' 카테고리의 다른 글

[펌] 자주 틀리는 우리말 맞춤법  (0) 2018.06.04
[펌] '구별하다'와 '구분하다'의 차이  (0) 2018.01.30
[펌] 고자질의 어원  (0) 2016.05.09
[펌] 궁색한 변명? 군색한 변명?  (0) 2016.05.09
자주 틀리는 맞춤법  (0) 2016.01.12
Posted by blueasa
, |

Apologies for the delay, I hit a brick wall dealing with WWW - as this is my first time I use this class, I didn't know that I had to provide the FULL path to a file for it to load it successfully.

The code is taken from here, with some modifications.

Just attach this to some gameObject, and have your music files in your Asset folder (at edit-time) or the game folder (when you build).

It's in C#, if you have trouble translating to JS let me know.

  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Linq;
  6. public class MusicPlayer : MonoBehaviour
  7. {
  8. public enum SeekDirection { Forward, Backward }
  9. public AudioSource source;
  10. public List<AudioClip> clips = new List<AudioClip>();
  11. [SerializeField] [HideInInspector] private int currentIndex = 0;
  12. private FileInfo[] soundFiles;
  13. private List<string> validExtensions = new List<string> { ".ogg", ".wav" }; // Don't forget the "." i.e. "ogg" won't work - cause Path.GetExtension(filePath) will return .ext, not just ext.
  14. private string absolutePath = "./"; // relative path to where the app is running - change this to "./music" in your case
  15. void Start()
  16. {
  17. //being able to test in unity
  18. if (Application.isEditor) absolutePath = "Assets/";
  19. if (source == null) source = gameObject.AddComponent<AudioSource>();
  20. ReloadSounds();
  21. }
  22. void OnGUI()
  23. {
  24. if (GUILayout.Button("Previous")) {
  25. Seek(SeekDirection.Backward);
  26. PlayCurrent();
  27. }
  28. if (GUILayout.Button("Play current")) {
  29. PlayCurrent();
  30. }
  31. if (GUILayout.Button("Next")) {
  32. Seek(SeekDirection.Forward);
  33. PlayCurrent();
  34. }
  35. if (GUILayout.Button("Reload")) {
  36. ReloadSounds();
  37. }
  38. }
  39. void Seek(SeekDirection d)
  40. {
  41. if (d == SeekDirection.Forward)
  42. currentIndex = (currentIndex + 1) % clips.Count;
  43. else {
  44. currentIndex--;
  45. if (currentIndex < 0) currentIndex = clips.Count - 1;
  46. }
  47. }
  48. void PlayCurrent()
  49. {
  50. source.clip = clips[currentIndex];
  51. source.Play();
  52. }
  53. void ReloadSounds()
  54. {
  55. clips.Clear();
  56. // get all valid files
  57. var info = new DirectoryInfo(absolutePath);
  58. soundFiles = info.GetFiles()
  59. .Where(f => IsValidFileType(f.Name))
  60. .ToArray();
  61. // and load them
  62. foreach (var s in soundFiles)
  63. StartCoroutine(LoadFile(s.FullName));
  64. }
  65. bool IsValidFileType(string fileName)
  66. {
  67. return validExtensions.Contains(Path.GetExtension(fileName));
  68. // Alternatively, you could go fileName.SubString(fileName.LastIndexOf('.') + 1); that way you don't need the '.' when you add your extensions
  69. }
  70. IEnumerator LoadFile(string path)
  71. {
  72. WWW www = new WWW("file://" + path);
  73. print("loading " + path);
  74. AudioClip clip = www.GetAudioClip(false);
  75. while(!clip.isReadyToPlay)
  76. yield return www;
  77. print("done loading");
  78. clip.name = Path.GetFileName(path);
  79. clips.Add(clip);
  80. }
  81. }

Couple of notes:

  1. You might ask, why use create a DirectoryInfo and then call GetFiles on that, instead of just directly go Directory.GetFiles(path)? Well, the latter one will return the paths of the files in pathrelative to path and NOT the full path (which is what you'll need to pass into WWW). i.e. if you do Directory.GetFiles("Assets"); it will return, (for example) a string array of { "Assets/soundFile1.wav", "Assets/soundFile2.ogg", etc } - these paths are relative to "Assets" while the full path would be "E:\Dropbox\UnityStuff\MyProject...\soundFile.wav"

  2. MP3s won't work in a PC build (haven't tried wav, but it should work) see this for more info. If you want MP3s, you have to go for something more complex, like MP3Sharp,NAudio and others.

  3. If you want to search recursively, change your GetFiles() call to GetFiles("*.*", SearchOption.AllDirectories)

EDIT:

JS, as per your request

  1. import UnityEngine;
  2. import System.Collections.Generic;
  3. import System.IO;
  4. import System.Linq;
  5. public enum SeekDirection { Forward, Backward }
  6. public var source : AudioSource;
  7. public var clips : List.<AudioClip> = new List.<AudioClip>();
  8. @HideInInspector @SerializeField private var currentIndex : int = 0;
  9. private var soundFiles : FileInfo[];
  10. private var validExtensions : List.<String> = new List.<String> ([ ".ogg", ".wav" ]);
  11. private var absolutePath : String = "./"; // relative path to where the app is running
  12. function Start()
  13. {
  14. //being able to test in unity
  15. if (Application.isEditor)
  16. absolutePath = "Assets/";
  17. if (source == null)
  18. source = gameObject.AddComponent.<AudioSource>();
  19. ReloadSounds();
  20. }
  21. function OnGUI()
  22. {
  23. if (GUILayout.Button("Previous")) {
  24. Seek(SeekDirection.Backward);
  25. PlayCurrent();
  26. }
  27. if (GUILayout.Button("Play current")) {
  28. PlayCurrent();
  29. }
  30. if (GUILayout.Button("Next")) {
  31. Seek(SeekDirection.Forward);
  32. PlayCurrent();
  33. }
  34. if (GUILayout.Button("Reload")) {
  35. ReloadSounds();
  36. }
  37. }
  38. function Seek(d : SeekDirection)
  39. {
  40. if (d == SeekDirection.Forward)
  41. currentIndex = (currentIndex + 1) % clips.Count;
  42. else {
  43. currentIndex--;
  44. if (currentIndex < 0) currentIndex = clips.Count - 1;
  45. }
  46. }
  47. function PlayCurrent()
  48. {
  49. source.clip = clips[currentIndex];
  50. source.Play();
  51. }
  52. function ReloadSounds()
  53. {
  54. clips.Clear();
  55. // get all valid files
  56. var info = new DirectoryInfo(absolutePath);
  57. soundFiles = info.GetFiles()
  58. .Where(function (f) { return IsValidFileType(f.Name); } )
  59. .ToArray();
  60. // and load them
  61. for(var s in soundFiles)
  62. StartCoroutine(LoadFile(s.FullName));
  63. }
  64. function IsValidFileType(fileName : String) : boolean
  65. {
  66. return validExtensions.Contains(Path.GetExtension(fileName));
  67. }
  68. function LoadFile(path : String)
  69. {
  70. var www = new WWW("file://" + path);
  71. print("loading " + path);
  72. var clip = www.GetAudioClip(false);
  73. while(!clip.isReadyToPlay)
  74. yield www;
  75. print("done loading");
  76. clip.name = Path.GetFileName(path);
  77. clips.Add(clip);
  78. }




[출처] http://answers.unity3d.com/questions/652919/music-player-get-songs-from-directory.html

반응형
Posted by blueasa
, |
Hey guys,

Just wanted to post a snippet in case it turns out to be helpful for anyone using an alternate localization solution with NGUI.

I'm currently using Smart Localization which can be found here: http://forum.unity3d.com/threads/173837-RELEASED-Smart-Localization-for-Unity3D

It's really good, it's free and has some neat features such as Microsoft Translate integration.

In order to use it with NGUI, simply type your string key into the label field and drag this script on.

Cheers!

Code (csharp):
  1.  
  2. using UnityEngine;
  3. using System.Collections;
  4. using System.Globalization;
  5.  
  6. [RequireComponent(typeof(UIWidget))]
  7. [AddComponentMenu("NGUI/UI/LocalizeWidget")]
  8. public class LocalizeWidget : MonoBehaviour
  9. {
  10.     // No public variables, we'll get the key from the widget field
  11.     private string key;
  12.     private string mLanguage;
  13.     private LanguageManager loc;
  14.  
  15.     // Localize the widget on start.
  16.     private void Start()
  17.     {
  18.         // Reference the language manager
  19.         loc = LanguageManager.Instance;
  20.        
  21.         // Hook up a delegate to run the localize script whenever a language was changed
  22.         loc.OnChangeLanguage += new ChangeLanguageEventHandler(Localize);
  23.        
  24.         // Initial localize run
  25.         Localize();
  26.     }
  27.    
  28.     // Incase the script didn't get the message from being inactive
  29.     private void OnEnable()
  30.     {
  31.         if(mLanguage != loc.language)
  32.             Localize();
  33.     }
  34.    
  35.     // Force-localize the widget.
  36.     private void Localize(LanguageManager thisLanguage=null)
  37.     {
  38.         UIWidget w = GetComponent<UIWidget>();
  39.         UILabel lbl = w as UILabel;
  40.         UISprite sp = w as UISprite;
  41.  
  42.         // If no localization key has been specified, use the label's text as the key
  43.         if (lbl != null)
  44.             key = lbl.text;
  45.        
  46.         string val = loc.GetTextValue(key);
  47.        
  48.         if(string.IsNullOrEmpty(val))
  49.             val = "Missing String";
  50.  
  51.         if (lbl != null)
  52.         {
  53.             // If this is a label used by input, we should localize its default value instead
  54.             UIInput input = NGUITools.FindInParents<UIInput>(lbl.gameObject);
  55.            
  56.             if (input != null  input.label == lbl)
  57.                 input.defaultText = val;
  58.             else
  59.                 lbl.text = val;
  60.         }
  61.         else if (sp != null)
  62.         {
  63.             sp.spriteName = val;
  64.             sp.MakePixelPerfect();
  65.         }
  66.        
  67.         // Set this widget's current language
  68.         mLanguage = loc.language;
  69.     }
  70. }
  71.  
 



출처 : http://forum.unity3d.com/threads/smart-localization-with-ngui.189253/


참조 : http://forum.unity3d.com/threads/released-smart-localization-for-unity3d.173837/

반응형
Posted by blueasa
, |

Unity로 안드로이드 앱을 개발하다보면 스크롤 안에 버튼이 들어갈 경우가 종종 있다.

PC에서 테스트 할 때는 마우스로 잘 눌리던 버튼이 스마트 폰에 넣어서 테스트 해보면 간혹 잘 눌리지 않는 경우가 있다. 이럴때 EventSystem 설정을 바꿔줘야하는데 다음과 같이 세팅 하면 적당하다.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
private const float inchToCm = 2.54f;
     
[SerializeField]
private EventSystem eventSystem = null;
     
[SerializeField]
private float dragThresholdCM = 0.5f;
//For drag Threshold
     
private void SetDragThreshold()
{
    if (eventSystem != null)
    {
        eventSystem.pixelDragThreshold = (int)(dragThresholdCM * Screen.dpi / inchToCm);
    }
}
  
  
void Awake()
{
    SetDragThreshold();
}



출처 : http://knightk.tistory.com/12

반응형
Posted by blueasa
, |
App initially starts:
  • OnApplicationFocus(true) is called
App is soft closed:
  • OnApplicationFocus(false) is called
  • OnApplicationPause(true) is called
App is brought forward after soft closing:
  • OnApplicationPause(false) is called
  • OnApplicationFocus(true) is called
Hope that helps



[출처] http://pjsmemo.tistory.com/34

반응형
Posted by blueasa
, |


[Link] https://www.assetstore.unity3d.com/kr/#!/content/59382


Disk/storage capacity check helper methods for Windows, OSX, iOS, and Android platform. 

Simply checks free, busy, and total storage space of your platform. 

Main methods: 
・CheckAvailableSpace(); 
・CheckBusySpace(); 
・CheckTotalSpace(); 

File managing functions like save and delete to text or binary file with special cases handling are also provided. 

Enjoy! 

Notes: 
1. Tested on Windows, OSX, iOS, and Android platform. 

2. Implemented file handling methods are not including methods that are already covered in standard library (most likely on System.IO). 


See and help me on Git:https://github.com/dkrprasetya/simple-disk-utils






[참조] http://forum.unity3d.com/threads/get-available-disk-space.251192/

반응형
Posted by blueasa
, |


Force Module Active가 체크 돼 있다면 체크해제 해 주자.

(현재 Unity 5.4.x 기준)



[참조] http://blog.naver.com/dunkydonk/220256297382

반응형
Posted by blueasa
, |

Objective

The main objective of this post is to Keep you updated with the latest optimization Techniques for Games developed in Unity.

 

Your game lags?
Players unhappy?
don't know what to do?

Well the answer is, your game needs "OPTIMIZATION !"

"Optimization is every important part while developing any game, As exciting and challenging as this may be, it makes it difficult for developers to get the information they need."

I found it almost impossible to get hold of information about techniques and algorithms that real developers used in their Optimized games. There is usually an atmosphere of secrecy about the coding techniques in top studios.

We realized that the time spent on optimizing a game is quite high, and decided that it is high time to share to the world of game developers, what we know about this important process.

So we have taken up an initiative and share valuable tips every day, and keep the community updated. we would also be very happy to welcome your ideas and techniques for the same.

Let us create an open community, and together move forward towards developing high quality AAA titles. :D

 

- See more at: http://www.theappguruz.com/blog/unity-optimization-initiative#sthash.0YKWVMH2.dpuf



[출처] http://www.theappguruz.com/blog/unity-optimization-initiative

반응형
Posted by blueasa
, |

[펌] Audio Clip

Unity3D/Tips / 2016. 9. 7. 14:33

원문 - http://docs.unity3d.com/Manual/class-AudioClip.html

음향 쪽 볼일이 생겨 번역해서 적어놓습니다. 오역이 있을 수 있습니다. T_T

 

Audio Clip

Audio Clip은 Audio Source가 사용하는 음향 정보를 포함하고 있습니다. 유니티는 모노널, 스테레오와 다 채널 음향 자산(최대 8채널)을 지원합니다. 유니티가 사용할 수 있는 음향 파일 포맷은 .aif, .wav, .mp3와 .ogg이며 .xm, .mod, .it와 .s3m 포맷인 tracker module도 사용할 수 있습니다. tracker module 자산은 자산 추출 조사기(asset import inspector) 탭에서 파형 미리 보기가 불가능하지만 다른 음향 자산과 같은 방식으로 동작합니다.

 

Audio Clip 조사기

 

속성

Load type(불러오기 방식)

실행 시 유니티가 음향 자산을 불러오는 데 사용하는 방법.

Decompress on load(불러올 때 압축해제)

음향 파일이 불러오는 즉시 압축이 해제됩니다. 즉시 압축 해제로 생기는 성능 부담(overhead)을 피하려면 이 옵션은 압축된 작은 소리에 사용하세요. Vorbis로 인코딩된 소리를 불러와 압축을 해제하면 압축 때보다 대략 열 배 정도의 메모리를 더 사용하게 되니 (ADPCM 인코딩의 경우는 대략 3.5배) 이 옵션을 큰 파일에는 사용하지 마세요.

Compressed in memory(메모리에 압축)

메모리에 소리를 압축된 상태로 유지하며 재생 중에 압축 해제합니다. 이 설정은 약간의 성능 부담(특히 Ogg/Vorbis 압축 파일)이 생기므로 불러와서 압축 해제시 메모리의 양(파일 크기)이 엄청나게 큰 파일에만 사용하세요. 압축 해제는 합성 스레드에서 일어나며, 분석기 창의 음향 구획의 "DSP CPU" 항목에서 확인할 수 있습니다.

Streaming(바로 재생)

소리를 바로 디코딩합니다. 이 방식은 압축된 데이터를 재생하는 데 필요한 최소한의 메모리만을 사용하기 때문에 디스크 읽기가 증가하고 바로 디코딩합니다. 각각의 스레드에서 일어나는 압축해제는 분석기 창의 음향 구획의 "Streaming CPU" 항목에서 확인할 수 있습니다.

 

Compression Format(압축 포맷)

실행 시 소리에 사용될 특정 포맷. 이 설정이 사용 가능한지는 현재 선택된 빌드 타겟에 따릅니다.

PCM

이 설정은 파일 크기가 클수록 더 높은 품질을 제공합니다. 아주 짧은 효과음에 최적입니다.

ADPCM

이 포맷은 많은 양의 잡음을 포함한 소리와 발자국, 충격, 무기 같은 자주 재생해야 하는 소리에 효과적입니다. 압축 비율은 PCM 대비 3.5배 더 작지만, CPU 사용량은 MP3/Vorbis보다 더 낮아서 앞서 말한 종류의 소리에 선택 시 선호됩니다.

Vorbis/MP3

파일 압축 결과가 작지만, 음질은 PCM 음향과 비교해서 다소 떨어집니다. 압축량은 음질 조정 단추를 움직여서 조정할 수 있습니다. 이 포맷은 중간 길이의 효과음과 음악에 최적입니다.

HEVAG

PS Vita에서 사용하는 고유 포맷입니다. 사양은 ADPCM과 매우 유사합니다.

 

Sample Rate Setting(추출률 설정)

Preserve Sample Rate(추출률 유지)

이 설정은 추출률을 수정하지 않은 채로 유지합니다. (기본)

Optimize Sample Rate(추출률 최적화)

이 설정은 추출률을 분석된 가장 높은 주파수 성분에 따라서 자동으로 최적화합니다.

Override Sample Rate(추출률 덮어쓰기)

이 설정은 수동으로 추출률을 덮어쓸 수 있게 합니다. 주파수 성분을 무시하려 할 때 효과적입니다.

 

Force To Mono(강제 모노널)

설정을 켜면, 음향 클립은 단 채널 소리로 내림 합성됩니다. 내림 합성한 신호는 최고치로 평균화되는데 이는 신호의 내림 합성 진행 결과물이 보통 원본보다 소리가 더 작기 때문이며, 이로 인해 최고치로 평균화된 신호는 향후 AudioSource의 음량 설정을 통한 조정을 위해 상단 부분(headroom)을 더 줍니다.

 

Load In Background(뒤에서 불러오기)

설정을 켜면, 음향 클립은 주 스레드를 멎게(stall) 하지 않기 위해 뒤에서 불립니다. 이 설정은 장면 재생이 시작될 때 모든 음향 클립을 불러와 완료하는 표준 유니티 행동을 확실히 하기 위해 기본으로 꺼져 있습니다. 뒤에서 아직 불러오고 있는 음향 클립에 대한 재생 요청은 클립 불러오기가 완료될 때까지 지연된다는 것을 알아두세요. 불러오기 상태는 AudioClip.loadState 속성으로 질의할 수 있습니다.

 

Preload Audio Data(음향 자료 미리 불러오기)

설정을 켜면, 음향 클립이 장면이 불릴 때 미리 불리게 됩니다. 이 설정은 장면 재생이 시작될 때 모든 음향 클립을 불러와 완료하는 표준 유니티 행동을 나타내기 위해 기본으로 켜져 있습니다. 이 설정이 지정되어 있지 않으면, 음향 데이터는 AudioSource.Play()/AudioSource.PlayOneShot()을 처음 사용할 때나 AudioSource.LoadAudioData()를 통해 불릴 수 있으며 AudioSource.UnloadAudioData()를 통해 불러오기를 다시 되돌릴 수 있습니다.

 

Quality(음질)

압축 포맷 클립의 압축량을 결정합니다. PCM/ADPCM/HEAVG 포맷은 적용되지 않습니다. 파일 크기 통계는 조사기에서 볼 수 있습니다. 이 값을 조정하는 좋은 방법은 조정 단추를 배포 사양에 맞춰 파일 크기는 작게 유지하며 재생 시 '충분히 좋은' 위치에 끌어다 놓는 것입니다. (당연한 소리 아닌가?!) 원본 크기는 원본 파일과 연관이 있는 점을 알아두세요. 파일이 MP3이고 압축 포맷이 PCM으로 설정되어 있으면, (즉 무압축) 파일은 이제 무압축으로 담기고 원본 MP3보다 공간을 더 사용하기 때문에 결과 비율은 100%보다 클 것입니다.

 

미리 보기 창

미리 보기 창은 세 가지 아이콘을 갖고 있습니다.

 선택된 클립을 자동으로 바로 재생하려 할 때.

 클립을 연속으로 반복해서 재생하려 할 때.

 클립을 재생합니다.

 

음향 자산 가져오기

유니티는 넓은 범위의 원본 파일 포맷을 읽을 수 있습니다. 파일을 가져오게 되면 빌드 타겟과 소리 종류에 맞춰 포맷을 변환합니다. 이는 조사기안에 있는 압축 포맷 설정을 통해 선택할 수 있습니다.

보통 PCM과 Vorbis/MP3 포맷은 원본에 가능한 근접하게 소리를 유지할 수 있어 주로 사용됩니다. PCM은 소리가 압축되지 않고 메모리에서 바로 읽을 수 있으므로 CPU에 요구하는 사양이 아주 적습니다. Vorbis/MP3은 음질 조정 단추를 조정해서 듣기 어려운 정보를 무시할 수 있습니다.

ADPCM은 무 압축된 PCM 설정보다 약단 더 CPU를 사용하므로 CPU와 메모리 사용량 사이를 절충하지만, Vorbis나 MP3 압축으로 얻을 수 있는 압축보다 보통 약 3배 정도 좋지 않은 압축비 3.5를 일정하게 얻게 됩니다. 더욱이 ADPCM은 (PCM과 같이) 자동 최적화나 소리의 주파수 성분과 적당한 품질 저하를 사용한 수동 추출률 지정을 통해 꽉 찬 소리 자산의 크기를 좀 더 줄일 수 있습니다.

module 파일(.mod, .it, .s3m, .xm)은 극히 작은 크기로 고품질을 낼 수 있습니다. 특별히 원하지 않는 이상 module 파일을 사용할 때는 불러오기 방식을 Compressed In Memory으로 설정했는지 확인하세요. 왜냐하면, Decompress On Load로 설정되어 있으면 전체 곡이 압축해제 되기 때문입니다. 이는 이런 종류의 클립 또한 GetData/SetData 사용을 허용하는 유니티 5.0의 새로운 동작 방식이지만 tracker module을 사용하는 일반적이고 기본적인 경우에는 Compressed In Memory으로 설정해야 합니다.

일반적인 경험에 따르면 압축된 음향(이나 module)은 배경음이나 대화 같은 긴 파일에 최적이며, PCM과 ADPCM은 부드러운 신호에서 누가 봐도 심한 ADPCM의 아티팩트 같은 약간의 잡음을 포함한 효과음에 최적입니다. 압축 조정 단추를 사용해서 압축량을 조정할 수 있습니다. 높은 압축에서 시작해 음질 저하를 인지할 수 있는 지점까지 서서히 설정을 내립니다. 그다음 음질 저하가 사라지는 걸 알 수 있을 때까지 약간씩 올립니다.

 

플랫폼별 특정 세부내용

iOS/Android

휴대용 플랫폼에서는 명시적으로 MP3를 선택하지 않으면 Vorbis 코덱으로 인코딩됩니다.



[출처] http://fetchinist.com/blogs/?p=984

반응형
Posted by blueasa
, |