Unity 버전을 2021.3에서 2022.3대로 올리고 나서
잘 사용중이던 쉐이더가 디바이스에서 마젠타로 보이는 문제가 생겼다.

뭔일인지 감이 안잡혀서 한참 해매다가 찾아서 기록함

Tags에

 "RenderPipeline" = "UniversalRenderPipeline"

 

 

라고 사용중이었는데

 "RenderPipeline" = "UniversalPipeline"

 

로 바꾸니 잘됨

 

 

Replaced "RenderPipeline" = "UniversalRenderPipeline" with "RenderPipeline" = "UniversalPipeline" as requested by Felipe. by oleks-k · Pull Request #1431 · Unity-Technologies/Graphics (github.com)

 

Replaced "RenderPipeline" = "UniversalRenderPipeline" with "RenderPipeline" = "UniversalPipeline" as requested by Felipe. by ole

Replaced "RenderPipeline" = "UniversalRenderPipeline" with "RenderPipeline" = "UniversalPipeline" as requested by Felipe.

github.com

 

 

'공부 > Unity3D' 카테고리의 다른 글

TimelineCopyTool  (0) 2021.06.28
Unity Path  (0) 2021.05.24
Unity Android Profiler 동작 안될때  (0) 2020.02.13
Eyetracking + Blinking  (0) 2019.06.26
NGUI 한글 마지막 글자 짤리는 문제  (0) 2018.03.21

 

'공부 > Unity3D' 카테고리의 다른 글

URP shader tag 관련 기록용  (0) 2023.09.12
TimelineCopyTool  (0) 2021.06.28
Unity Android Profiler 동작 안될때  (0) 2020.02.13
Eyetracking + Blinking  (0) 2019.06.26
NGUI 한글 마지막 글자 짤리는 문제  (0) 2018.03.21

 

출처 - https://codetime.tistory.com/633

 

[Unity 2020] android profier 연결 관련 정리

유니티 에디터 종료 윈도 검색 - cmd 실행 adb kill-server adb start-server ------------- ※ forward 진행 전 처리 netstat -a -o -n | find "34999" (나온 리스트 맨 오른쪽이 process_id) taskkill /F /PID p..

codetime.tistory.com

 

============================================================================================

출처 - https://lunchballer.com/archives/72

 

[Android] Connect Unity Profiler to Mobile Device

#유니티 프로파일러를 모바일 디바이스에 연결하기 There is a good descrption about how to remote profiling on device on Unity Manual page (Link). However, sometimes it doesn’t work like that if you miss some parts …

lunchballer.com

 

#유니티 프로파일러를 모바일 디바이스에 연결하기

There is a good descrption about how to remote profiling on device on Unity Manual page (Link). However, sometimes it doesn’t work like that if you miss some parts or mix the procedure.  This is easy steps you can follow.

  • Build with option check ‘Development Build’ on Build Settings. (빌드 세팅에서 Development Build 체크해서 빌드하기)
  • Install the app just built. (디바이스에 앱 설치)
  • Check the cable connection between PC/Mac and the device. (케이블이 컴퓨터와 디바이스사이에 잘 연결되어 있는지 확인)
  • Open any command console on PC/Mac (커맨드창 열기)
  • Check if the device is detected through adb command. (아래 명령어를 쳐서 디바이스 인식 확인)
    • > adb devices

if any device is not attached, you should check if the device driver is installed properly.

  • Open adb tunnel between Unity Editor and the installed app (유니티 에디터와 앱 사이에 adb 터널링 만들기)
    • > adb forward tcp:34999 localabstract:Unity-{insert bundle identifier here}
    • if unity version is under Unity 5.x, then port number is 54999. (5.x 버전일 경우 포트 54999)
  • Start Unity editor. (Don’t start Unity editor before adb tunneling) (유니티 에디터 시작. adb 터널링 전에 유니티 에디터를 먼저 시작하지 말것)
  • Open Profiler window ( Unity top menu: Window > Profiler ) (프로파일러 윈도우 열기)
  • Select the AndroidProfiler(ADB@127.0.0.1:34999) on Active Profiler dropdown menu (Active Profiler 드롭다운 메뉴에서 AndroidProfiler 선택)

Profiler dropdown menu

  • You should see cpu, memory, and various graphs from there. (그래프들이 표시되면서 프로파일링이 잘 되는지 확인)

  • If not showing any graph, or if active profiler is not AndroidProfiler(ADB@127.0.0.1:34999), then follow below steps. (만약 그래프가 안보이거나 AndroidProfiler가 선택이 안되다면,)
  • Stop/close Unity editor process completely. (RESTART STEP) (유니티 에디터 종료)
  • Restart adb server (adb 서버 재시작)
    • > adb kill-server
    • > adb start-server
  • Open adb tunnel again. (다시 adb 터널링)
    • > adb forward tcp:34999 localabstract:Unity-{insert bundle identifier here}
  • Start Unity editor. (유니티 에디터 시작)
  • Open Profiler window. (프로파일러 윈도우 열기)
  • Select the AndroidProfiler(ADB@127.0.0.1:34999) on Active Profiler dropdown menu. (Active Profiler에서 AndroidProfiler 선택)
  • You should see various graphs now. (프로파일링 되는지 확인)
  • You might disconnect the tunnel if you unplug your device from PC/Mac. Then follow steps from “RESTART STEP” again. (디바이스를 컴퓨터에서 뽑았을때 터널링이 끊겼을 수 있으므로 RESTART STEP으로 부터 다시 세팅)

  • If you are still not seeing any profiling results, then check firewall port settings. (그래도 안되면, 방화벽 포트 세팅 확인)
    • (Windows) Control panels > System and security > Windows firewall > Advanced settings
      • Click Outbound Rules
      • Click New Rule… on Actions
      • Port
        • TCP / 54998-55511
      • Set any name such as UnityRemoteProfiling.
  • Then follow steps from “RESTART STEP” again.

 

-------------------------------------------------------------------------------------------------------------------------------------------------

이도저도 하다 안되면 BuildAndRun으로 빌드해서 터널링을 만들고하면 되는 경우도 있음

 

 

+ 23.07.25) 위에 방법들 시도해도 전부 안될때,

BuildAndRun 안하고 걍 핸드폰의 USB디버깅을 껏다 키고 다시 허용하면 되는듯?

'공부 > Unity3D' 카테고리의 다른 글

TimelineCopyTool  (0) 2021.06.28
Unity Path  (0) 2021.05.24
Eyetracking + Blinking  (0) 2019.06.26
NGUI 한글 마지막 글자 짤리는 문제  (0) 2018.03.21
Unity 3D 에서 구글 스프레드 시트로 로그 보내기  (0) 2018.02.02

using UnityEngine;
using System.Collections;

public class EyeTrackBlink : MonoBehaviour
{
   
    public float eyeMaxOffset = 0.3f; // max amount the eyes are clamped to
    public Renderer eyeRend; // eyeball renderer
    public Renderer lidRend; // eyelid renderer
    public float blinkingTextureAmount = 4f; // amount of frames of blinking animation
    public float blinkTimer = 4f; // timer for when to blink again
    public float blinkTransition = 0.05f;
    Vector2 eyeOffset;
    Vector2 eyelidOffset;
    float blinkOffset;
    float blinkTimerR;
   
    void Start()
    {
        blinkTimerR = blinkTimer;
        blinkOffset = 1 / blinkingTextureAmount;
        eyelidOffset = new Vector2(0,0);
        lidRend.materials[1].SetTextureScale("_MainTex", new Vector2(blinkOffset, 1));

    }
    void Update()
    {
        blinkTimerR -= Time.deltaTime;
        if (blinkTimerR <= 0.0f)
        {
            StartCoroutine(Blink());

        }
      
        eyeOffset = new Vector2(transform.localPosition.x, -transform.localPosition.y);
           // clamp so the eye doesnt disappear  
        if(eyeOffset.x < -eyeMaxOffset || eyeOffset.x > eyeMaxOffset)
        {
            eyeOffset.x = Mathf.Clamp(eyeOffset.x, -eyeMaxOffset, eyeMaxOffset);
        }
         if(eyeOffset.y < -eyeMaxOffset || eyeOffset.y > eyeMaxOffset)
        {
            eyeOffset.y = Mathf.Clamp(eyeOffset.y, -eyeMaxOffset, eyeMaxOffset);
        }
       // send offset to shader
        eyeRend.material.SetTextureOffset("_MainTex", eyeOffset);
        
    }

    IEnumerator Blink()
    {
        // animating 1 - 2 - 3 - 4 - 3 - 1, if you have more or less blinking animation frames, add or delete them here
        blinkTimerR = blinkTimer + Random.Range(-1,1); // slight randomisation to the blinking
        lidRend.materials[1].SetTextureOffset("_MainTex", eyelidOffset); //1
        yield return new WaitForSeconds(blinkTransition);
        lidRend.materials[1].SetTextureOffset("_MainTex", new Vector2(eyelidOffset.x + blinkOffset, 0)); //2
        yield return new WaitForSeconds(blinkTransition);
        lidRend.materials[1].SetTextureOffset("_MainTex", new Vector2(eyelidOffset.x + (blinkOffset * 2), 0)); //3
        yield return new WaitForSeconds(blinkTransition);
        lidRend.materials[1].SetTextureOffset("_MainTex", new Vector2(eyelidOffset.x + (blinkOffset * 3), 0)); //4
        yield return new WaitForSeconds(blinkTransition);
        lidRend.materials[1].SetTextureOffset("_MainTex", new Vector2(eyelidOffset.x + (blinkOffset * 2), 0)); //3
        yield return new WaitForSeconds(blinkTransition);
        lidRend.materials[1].SetTextureOffset("_MainTex", eyelidOffset); //1
       

    }
}

 

 

출처 : https://twitter.com/minionsart/status/948235509825966080

 

Joyce[MinionsArt] on Twitter

“Using SetTextureOffset to animate a texture sheet, and track an object with eyes in #unity3d, like in Legend of Zelda - Twilight Princess #gamedev #unitytips #indiedev Sample code in first reply More stuff > https://t.co/FqAsMb9Plg https://t.co/9ES4iBrsX1

twitter.com

 

- 추가

위 자료처럼 분리해서 위치를 잡아준 뒤, Unity Timeline상에서 Material의 Offset값을 애니메이션하여 적용함

 

출처 - https://docs.unity3d.com/Manual/ExecutionOrder.html

==================================================================================

매번 유니티 홈페이지까지 가서 찾기 귀찮아서 긁어옴


출처 - https://docs.unity3d.com/Manual/CollidersOverview.html


Mac Path: ~/Library/Caches/Unity/

Windows path: C:\Users\\AppData\LocalLow\Unity\WebPlayer\Cache\



출처 : http://answers.unity3d.com/questions/956259/where-is-the-cache-folder-for-wwwloadfromcacheordo.html

+ Recent posts