블로그 이미지
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 2021.3.37f1

----

 

기존에 Custom Debug.cs를 만들어서 Plugins 폴더에 넣고 Debug.Log 사용 유무를 제어했었는데,

스토어 둘러보다보니 Disable Logs Easy라는게 보여서 살펴보니 좋아보인다.

게다가 Free..

기존의 Debug.cs를 제거하고 이걸로 교체 함.

 

 

[링크] https://assetstore.unity.com/packages/tools/utilities/disable-logs-easy-206473

 

Disable Logs Easy | 유틸리티 도구 | Unity Asset Store

Use the Disable Logs Easy from Dev Dunk Studio on your next project. Find this utility tool & more on the Unity Asset Store.

assetstore.unity.com

 

[참조] https://blueasa.tistory.com/1024

 

디바이스에서 Debug.Log 메시지 출력하지 않도록 하기

[추가] 2024-04-17 #define으로 Editor, Device등 원하는 곳에 띄울 수 있게 약간 변형함 #if UNITY_EDITOR #define MY_DEBUG #endif using UnityEngine; using System.Collections; using System; using UnityEngine.Internal; /// /// It overrides Uni

blueasa.tistory.com

 

반응형
Posted by blueasa
, |

Unity 2021.3.37f1

Lunar Mobile Console - Pro v1.8.5

----

Lunar Mobile Console - Pro에서 Actions and Variables를 사용할 수 있는데,

이번에 enum 넣으면서 참조 링크를 다시 봤는데 enum 관련 작성을 제대로 안해놔서 좀 헤메서..

변수 타입별 사용방법 정리 겸 샘플 작성해서 올려 둠.

 

 

using UnityEngine;
using System.Collections;
using LunarConsolePlugin;

public class AnLunarConsole_Actions_Variables_Manager : MonoBehaviour
{
    public enum eVariablesType
    {
        One,
        Two,
        Three
    }

    [CVarContainer]
    public static class Variables
    {
        public static readonly CVar myBool = new CVar("My boolean value", true);
        public static CVarChangedDelegate CVarChangedDelegate_myBool = null;
        public static readonly CVar myFloat = new CVar("My float value", 3.14f);
        public static CVarChangedDelegate CVarChangedDelegate_myFloat = null;
        public static readonly CVar myInt = new CVar("My integer value", 10);
        public static CVarChangedDelegate CVarChangedDelegate_myInt = null;
        public static readonly CVar myString = new CVar("My string value", "Test");
        public static CVarChangedDelegate CVarChangedDelegate_myString = null;
        public static readonly CEnumVar<eVariablesType> myEnum = new CEnumVar<eVariablesType>("My enum value", eVariablesType.Two);
        public static CVarChangedDelegate CVarChangedDelegate_myEnum = null;
    }

    IEnumerator Start()
    {
        yield return null;

        InitActions();
        InitVariables();

        AddAction();
        AddDelegate();
    }

    void OnDestroy()
    {
        RemoveAction();
        RemoveDelegate();
    }

    #region Actions
    void InitActions()
    {

    }

    void AddAction()
    {
        LunarConsole.RegisterAction("[Common] Action Common 1", Action_Common_1);
        LunarConsole.RegisterAction("[Common] Action Common 2_1", () => Action_Common_2(1));
        LunarConsole.RegisterAction("[Common] Action Common 2_2", () => Action_Common_2(2));
        LunarConsole.RegisterAction("[InGame] Action InGame", Action_InGame);
        LunarConsole.RegisterAction("[OutGame] Action OutGame", Action_OutGame);
    }

    void RemoveAction()
    {
        LunarConsole.UnregisterAllActions(this); // don't forget to unregister!
    }

    void Action_Common_1()
    {
        // do something..
    }

    void Action_Common_2(int _iValue)
    {
        // do something..
    }

    void Action_InGame()
    {
        // do something..
    }

    void Action_OutGame()
    {
        // do something..
    }
    #endregion

    #region Variables
    void InitVariables()
    {
        Variables.myBool.BoolValue = true;
        Variables.myFloat.FloatValue = 3.14f;
        Variables.myInt.IntValue = 10;
        Variables.myString.Value = "Test";
        //Variables.myEnum.EnumValue = eVariablesType.Two;  // Can't
    }

    void AddDelegate()
    {
        // myBool
        Variables.CVarChangedDelegate_myBool = (value) =>
        {
            UnityEngine.Debug.Log("[myBool is] " + value);
            OnCVarChangedDelegate_myBool(value);
        };
        Variables.myBool.AddDelegate(Variables.CVarChangedDelegate_myBool);

        // myFloat
        Variables.CVarChangedDelegate_myFloat = (value) =>
        {
            UnityEngine.Debug.Log("[myFloat is] " + value);
            OnCVarChangedDelegate_myFloat(value);
        };
        Variables.myFloat.AddDelegate(Variables.CVarChangedDelegate_myFloat);

        // myInt
        Variables.CVarChangedDelegate_myInt = (value) =>
        {
            UnityEngine.Debug.Log("[myInt is] " + value);
            OnCVarChangedDelegate_myInt(value);
        };
        Variables.myInt.AddDelegate(Variables.CVarChangedDelegate_myInt);

        // myString
        Variables.CVarChangedDelegate_myString = (value) =>
        {
            UnityEngine.Debug.Log("[myString is] " + value);
            OnCVarChangedDelegate_myString(value);
        };
        Variables.myString.AddDelegate(Variables.CVarChangedDelegate_myBool);

        // myEnum
        Variables.CVarChangedDelegate_myEnum = (value) =>
        {
            UnityEngine.Debug.Log("[myEnum is] " + value);
            CEnumVar<eVariablesType> cEnumVar = (CEnumVar<eVariablesType>)value;
            eVariablesType eEnumValue = cEnumVar.EnumValue;
            OnCVarChangedDelegate_myEnum(eEnumValue);
        };
        Variables.myEnum.AddDelegate(Variables.CVarChangedDelegate_myEnum);
    }

    void RemoveDelegate()
    {
        Variables.myBool.RemoveDelegate(Variables.CVarChangedDelegate_myBool);
        Variables.myFloat.RemoveDelegate(Variables.CVarChangedDelegate_myFloat);
        Variables.myInt.RemoveDelegate(Variables.CVarChangedDelegate_myInt);
        Variables.myString.RemoveDelegate(Variables.CVarChangedDelegate_myString);
        Variables.myEnum.RemoveDelegate(Variables.CVarChangedDelegate_myEnum);
    }

    void OnCVarChangedDelegate_myBool(bool _bValue)
    {
        // do something..
    }

    void OnCVarChangedDelegate_myFloat(float _fValue)
    {
        // do something..
    }

    void OnCVarChangedDelegate_myInt(int _iValue)
    {
        // do something..
    }

    void OnCVarChangedDelegate_myString(string _strValue)
    {
        // do something..
    }

    void OnCVarChangedDelegate_myEnum(eVariablesType _eVariablesType)
    {
        // do something..
    }
    #endregion
}

 

 

[참조] https://github.com/SpaceMadness/lunar-unity-console/wiki/Actions-and-Variables#listening-for-variable-changes

 

Actions and Variables

High-performance Unity iOS/Android logger built with native platform UI - SpaceMadness/lunar-unity-console

github.com

 

반응형
Posted by blueasa
, |

[링크]

https://psh10004okpro.com/entry/Unity-%EB%A1%9C%EC%BB%AC%EB%9D%BC%EC%9D%B4%EC%A7%95-TextMeshPro-TMPFont-%ED%95%9C%EA%B5%AD%EC%96%B4-%EC%9D%BC%EB%B3%B8%EC%96%B4-%EC%A4%91%EA%B5%AD%EC%96%B4-%EB%8C%80%ED%91%9C%EB%82%98%EB%9D%BC-%EC%9C%A0%EB%8B%88%EC%BD%94%EB%93%9C-%EB%B2%94%EC%9C%84

 

Unity 로컬라이징 TextMeshPro TMP_Font 유니코드 범위

Unity TextMeshPro Character Set : Unicode Range (Hex) 핑크색 배경 글이 필수 주요 문자입니다. 한글 구분 시작 끝 한글(자음, 모음) 1100 11FF 호환용 한글(자음, 모음) 3131 318F 한글 음절(가~힣) AC00 D7A3 한자 구분

psh10004okpro.com

 

반응형
Posted by blueasa
, |

Windows 10

SourceTree 3.4.17

----

 

git에서 Pull을 받으려고 하니 'Filename too long' 에러가 뜨면서 Pull 받을 수가 없다.

검색해보니 longpath 허용을 해주면된다고 한다.

하는김에 전역으로 적용하기 위해 --global 추가 적용함

----

 

1) 소스트리 터미널 열기(SourceTree > Actions > Open in Terminal)

 

2) 아래 명령어 실행

git config --global core.longpaths true

 

 

 

[참조] https://daewonyoon.tistory.com/456

 

[GIT] error unable to create file ... Filename too long

git clone 을 하려고 하는데, 파일명이 너무 길어서 실패했다. error: unable to create file 2022/07_swift_test_projects/how-to-make-async-command-line-tools-and-scripts-1/ how-to-make-async-command-line-tools-and-scripts-1/SwiftConcurrencyB

daewonyoon.tistory.com

[참조] https://neive.tistory.com/748

 

소스트리(SourceTree) Filename too long 에러 뜰 때

git config core.longpaths true 소스트리에서 동작>터미널 열기 로 콘솔창 열어서 위의 커멘드를 입력

neive.tistory.com

 

반응형
Posted by blueasa
, |

Apple Mac Studio M1 Ultra

Sonoma 14.4.1

----

 

Mac M1에서 CocoaPods 업데이트(pod repo update)를 하려고 pod을 입력하니 '찾을 수 없다(Can't find pod in path)'고 뜬다.

 

찾아보니 M1에서는 별도로 처리를 좀 해줘야되나보다.

아래와 같은 순서로 진행했다.

 

 

1. 응용 프로그램 > 유틸리티 > 터미널.app 우클릭(Right-Mouse Click) > 정보 가져오기 클릭(Left-Mouse Click)

 

2. 'Rosetta를 사용하여 열기' 체크

 

3. '터미널.app' 완전 종료 후 재실행

4. cocoapods/ffi 언인스톨(기존 것 삭제)

    → sudo gem uninstall cocoapods

    → sudo gem uninstall ffi

 

5. sudo xcode-select --switch /Applications/Xcode.app

    (정확히 왜 하는진 모르니 일단 하라고하니 함..)

6. cocoapods/ffi 인스톨

     sudo gem install cocoapods

     sudo gem install ffi

7. pod 설치

     pod install

 

[참조] https://github.com/CocoaPods/CocoaPods/issues/10220

 

Got error while trying pod install · Issue #10220 · CocoaPods/CocoaPods

Command /usr/local/bin/pod install Report What did you do? pod install What did you expect to happen? Installing my pod's What happened instead? Error. This is on my MacBook Pro with the new M1 pro...

github.com

[Cocoapods 제거 참조] https://velog.io/@jungti1234/cocoapods-%EC%82%AD%EC%A0%9C%EC%A0%9C%EA%B1%B0-%EB%B0%A9%EB%B2%95

 

cocoapods 삭제/제거 방법

 

velog.io

 

반응형
Posted by blueasa
, |
1. gem list --local | grep cocoapods 명령어로 조회해보면 cocoapods 관련 설치가 많은데 다 지울 것

2. 지우는 명령어는 sudo gem uninstall cocoapods (혹은 cocoapods 관련 설치된 라이브러리명)

3. 내 유저명 폴더에 숨겨진 .cocoapods 폴더 제거
rm -rf ~/.cocoapods

4. /Users/유저명/Library/Caches/CocoaPods 폴더 제거
rm -rf ~/Library/Caches/CocoaPods

(재설치 원하면 5. brew install cocoapods 명령어 입력하여 설치하면 끝)

 

 

[출처] https://velog.io/@jungti1234/cocoapods-%EC%82%AD%EC%A0%9C%EC%A0%9C%EA%B1%B0-%EB%B0%A9%EB%B2%95

 

cocoapods 삭제/제거 방법

 

velog.io

 

반응형
Posted by blueasa
, |