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

카테고리

분류 전체보기 (2809)
Unity3D (865)
Programming (479)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (234)
협업 (61)
3DS Max (3)
Game (12)
Utility (140)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (16)
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

Unity 2021.3.47f1

----

 

Dynamic Font의 옵션에 Include Font Data가 체크 돼 있으면,  AssetBundle 빌드 시 Font도 번들에 포함 되는 것 같다.

[참조] https://codingstarter.tistory.com/37

 

[Unity] AssetBundle & Addressable 폰트 중복 로드 문제

- UI를 번들에서 로드하도록 수정 했더니 메모리에 동일한 폰트가 중복으로 로드되는 현상이 발생 - 동일한 폰트여도 각 번들마다 개별적으로 로드되는 것으로 추정 - 폰트 에셋의 Include Font Data

codingstarter.tistory.com

 

AssetBundle 빌드는 스크립트로 하기 때문에 위 참조 링크의 내용대로

AssetBundle 빌드 전, IncludeFontData를 false로 하고,

AssetBundle 빌드 후, IncludeFontData를 true로 되돌리도록 처리했다.

 

기본적으로 Dynamic Font의 폴더를 지정은 해야되지만 폴더의 하위는 모두 훑어서 ttf파일은 모두 처리하도록 해뒀다.

        /// <summary>
        /// Dynamic Font Path
        /// 사용하는 Dynamic Font를 AssetBundle 빌드 할 때 포함 안되도록
        /// AssetBundle 빌드 시, false 했다가 되돌리기 위해 사용
        /// [주의] 실제 사용하는 다이나믹 폰트 Folder Path 체크 필요
        /// </summary>
        private static string m_strDynamicFontFolderPath = "Assets/Fonts/Dynamic";

        public static void ProcessIncludeFontData(string _strTargetDirectory, bool _bActive)
        {
            if (false == Directory.Exists(_strTargetDirectory))
                return;

            System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(_strTargetDirectory);
            foreach (System.IO.FileInfo fi in di.GetFiles())
            {

                if (fi.Extension.ToLower().CompareTo(".ttf") == 0)
                {
                    //string strFileNameOnly = fi.Name.Substring(0, fi.Name.Length - 4);
                    string strFullFilePath = fi.FullName.Replace("\\", "/");
                    Debug.LogWarningFormat("[strFullFilePath] {0}", strFullFilePath);

                    // 프로젝트 절대경로 제거하고 상대경로로 변경(Assets는 남기기)
                    string atrAssetPath = strFullFilePath.Replace(Application.dataPath, "Assets");
                    Debug.LogWarningFormat("[atrAssetPath] {0}", atrAssetPath);

                    TrueTypeFontImporter cImporter = AssetImporter.GetAtPath(atrAssetPath) as TrueTypeFontImporter;
                    if (null != cImporter)
                    {
                        cImporter.includeFontData = _bActive;
                        cImporter.SaveAndReimport();

                        Debug.LogWarningFormat("[atrAssetPath] {0} [cImporter.includeFontData] {1}", atrAssetPath, cImporter.includeFontData);
                    }
                }
            }

            foreach (System.IO.DirectoryInfo sdi in di.GetDirectories())
            {
                Debug.LogWarningFormat("[SubDirectory.FullName] {0}", sdi.FullName);
                ProcessIncludeFontData(sdi.FullName, _bActive);
            }
        }
        
        /// <summary>
        /// IncludeFontData 활성화
        /// </summary>
        public static void ActiveTrueTypeFont_IncludeFontData()
        {
            if (false == Directory.Exists(m_strDynamicFontFolderPath))
                return;

            ProcessIncludeFontData(m_strDynamicFontFolderPath, true);
        }

        /// <summary>
        /// IncludeFontData 비활성화
        /// </summary>
        public static void InActiveTrueTypeFont_IncludeFontData()
        {
            if (false == Directory.Exists(m_strDynamicFontFolderPath))
                return;

            ProcessIncludeFontData(m_strDynamicFontFolderPath, false);
        }

 

 

P.s. NGUI Font는 해당 옵션이 없어서 어떻게 처리해야될지 고민..

반응형
Posted by blueasa
, |

[링크] https://codingstarter.tistory.com/37

 

[Unity] AssetBundle & Addressable 폰트 중복 로드 문제

- UI를 번들에서 로드하도록 수정 했더니 메모리에 동일한 폰트가 중복으로 로드되는 현상이 발생 - 동일한 폰트여도 각 번들마다 개별적으로 로드되는 것으로 추정 - 폰트 에셋의 Include Font Data

codingstarter.tistory.com

 

 

 

반응형
Posted by blueasa
, |

[링크] https://m.blog.naver.com/chvj7567/223005914392

 

유니티(Unity) - 파이어베이스 연동, 구글 플레이 게임즈(GPGS) 연동

위 링크를 통해 파이어베이스의 기본적인 설정을 한다. 1. 유니티 패키지 임포트 FirebaseAuth 패키지를 ...

blog.naver.com

 

반응형
Posted by blueasa
, |

 

[링크] https://hub1234.tistory.com/44

 

[Unity] GameCenter로 Firebase인증하기

GameCenter로 Firebase인증하기 유니티에서 IOS Game Center → FireBase 접속 https://firebase.google.com/docs/auth/unity/start?authuser=0 Unity에서 Firebase 인증 시작하기 Firebase 인증을 사용하면 사용자가 이메일 주소와

hub1234.tistory.com

 

반응형
Posted by blueasa
, |

[링크] https://sharp-steamed-bread-for-game.tistory.com/17

 

URP 패키지를 적용한 뒤 Camera의 Depth Only는 어디에 있나요?

당신의 Depth Only는 Stack으로 대체되었다. 그러니까 서브 카메라를 UI처럼 메인 카메라 위에 오버레이한다는 거니까, 서브 카메라의 Render Type를 Overlay로 바꿔준다. 그리고 메인 카메라로 와서 Stack

sharp-steamed-bread-for-game.tistory.com

 

반응형

'Unity3D > URP' 카테고리의 다른 글

[링크] Upgrading from the Built-In Render Pipeline to URP  (0) 2025.01.10
Posted by blueasa
, |

[링크] https://docs.unity3d.com/6000.1/Documentation/Manual/urp/upgrading-from-birp.html

 

Unity - Manual: Upgrading from the Built-In Render Pipeline to URP

 

docs.unity3d.com

 

반응형
Posted by blueasa
, |

 

[링크] 구글 플레이 게임 서비스 & 애플 게임 센터 연동 (1/2) #설정편

 

[Unity3D] 구글 플레이 게임 서비스 & 애플 게임 센터 연동 (1/2) #설정편

안녕하세요. 이번 포스팅의 주제는 Google Play Games 플러그인 연동하기 입니다! 유니티 프로젝트에 Android - 구글 플레이 게임 서비스 (Google Play Games Services) iOS - 애플 게임 샌터 (Apple Game Center) 를 연

minhyeokism.tistory.com

 

[링크] 구글 플레이 게임 서비스 & 애플 게임 센터 연동 (2/2) #코드편

 

[Unity3D] 구글 플레이 게임 서비스 & 애플 게임 센터 연동 (2/2) #코드편

[Unity3D] 구글 플레이 게임 서비스 & 애플 게임 센터 연동 (1/2) #설정편 링크 : http://minhyeokism.tistory.com/70 * 본격적으로 진행하기 전에 한 가지 말씀드리자면 UnityEngine.Social.localUser 는 Androiod와 iOS 두

minhyeokism.tistory.com

 

반응형
Posted by blueasa
, |

 

[링크] https://hub1234.tistory.com/43

 

[Unity] IOS Game Center 로그인하기 (매우 쉬움)

Unity IOS Game Center 로그인하기 애플 로그인을 하려면 따로 플러그인을 받아줘야 하지만, 게임센터는 Unity에서 API를 지원해주기에, 비교적 매우 손쉽게 연동이 가능하다. 자 우선 첫 번째, 앱스토어

hub1234.tistory.com

 

반응형
Posted by blueasa
, |

[링크] https://assetstore.unity.com/packages/tools/camera/per-layer-camera-culling-35100

 

Per-Layer Camera Culling | 카메라 | Unity Asset Store

Get the Per-Layer Camera Culling package from Umbra Evolution and speed up your game development process. Find this & other 카메라 options on the Unity Asset Store.

assetstore.unity.com

 

[참고] https://docs.unity3d.com/ScriptReference/Camera-layerCullSpherical.html

 

Unity - Scripting API: Camera.layerCullSpherical

Normally this type of culling is performed by moving the Camera's far plane closer to the eye. By setting this value to true, the culling is instead based on spherical distance. The benefit is that rotating on the same spot does not affect which objects ar

docs.unity3d.com

 

반응형
Posted by blueasa
, |

Use the [c] tag. That's what removes the default tint color. So do it like so:

Mission time left:
[c][ffffff]30 months[-][/c]

 

 

[링크] https://www.tasharen.com/forum/index.php?topic=12104.0

 

UILabel bbcode Color only modifying existing label color tint?

It really was like yo said before, you are right. But already a while it works like this. I am not sure, but i think now there is bb tag, that allows to ignore current font color tint.

www.tasharen.com

 

반응형
Posted by blueasa
, |