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

카테고리

분류 전체보기 (2836)
Unity3D (884)
Programming (479)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (188)
협업 (64)
3DS Max (3)
Game (12)
Utility (140)
Etc (99)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (52)
Android (16)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (19)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

 

[링크] 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
, |

[링크] https://github.com/Unity-UI-Extensions/com.unity.uiextensions

 

GitHub - Unity-UI-Extensions/com.unity.uiextensions

Contribute to Unity-UI-Extensions/com.unity.uiextensions development by creating an account on GitHub.

github.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
, |

[링크] NGUI - BBCode

Unity3D/NGUI / 2024. 10. 17. 11:34

[링크] https://twocap.tistory.com/97

 

NGUI - BBCode

(본문 : http://www.tasharen.com/forum/index.php?topic=6706.0) NGUI에서는 BBCode를 약간 다르게 사용하는 부분도 있습니다. [u][url=http://www.tasharen.com/forum/index.php?topic=7013.0]this link[/url][/u] : url 사용하기 [c]text here[/

twocap.tistory.com

 

반응형
Posted by blueasa
, |

[링크] https://moondongjun.tistory.com/99

 

NGUI, BBCode 태그 제거하기 (Replace)

BBCode단순하게 BBCode 기능을 비활성화할 수 있지만(supportEncoding = false), 반드시 이용은 하나 유저 입력을 막고 싶은 경우가 있습니다. 정규식과 string의 Replace를 적절히 이용하면 쉽게 제거할 수 있

moondongjun.tistory.com

 

반응형

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

[펌] NGUI - Color Tint 무시하기  (0) 2024.10.17
[링크] NGUI - BBCode  (0) 2024.10.17
UITexture UV Animation  (0) 2024.09.05
[펌] NGUI-UILabel : Shadow+Outline  (0) 2024.01.25
[링크] [UnityNGUI] ScrollView에 Particle Clipping하기  (0) 2023.10.31
Posted by blueasa
, |

Unity 2021.3.44f1

Unity 6000.0.22f1

----

 

유니티 Device Simulator에 iPhone 14 이상이 없어서 찾아보니 만들어 놓은게 있어서 폴더 파일 위치나 이름들만 정리해서 UnityPackage 형태로 Export 해서 올려 둠.

 

폴더명이나 위치, 파일명 등은 Unity6에서 추가 설치되는 Device Simulator의 Package에 있는 걸 참조해서 수정했다.

아래 스크린샷 참조

 

 

아래 파일을 Import만 하면 그대로 잘 적용 된다.

(Unity6에서도 Import해서 잘 되는 것 확인함.)

 

[iPhone 14 & 15 시뮬레이터 정의 파일]

com.unity.device-simulator-Apple-iPhone-14-and-15-models.unitypackage
3.19MB

 

 

 

[참조] https://github.com/henryprescott/com.unity.device-simulator-Apple-iPhone-14-and-15-models?tab=readme-ov-file

 

GitHub - henryprescott/com.unity.device-simulator-Apple-iPhone-14-and-15-models: A simple .device (Device Info Asset) JSON file

A simple .device (Device Info Asset) JSON file with settings for iPhone 14 and 15 devices. Safe Area adjusted to the standard style of Unity devices. - henryprescott/com.unity.device-simulator-App...

github.com

 

[참조] https://gist.github.com/mrcarriere/049596740fb52907edf68712d2818df0

 

iPhone 14 Pro & Pro Max Device Definitions

iPhone 14 Pro & Pro Max Device Definitions. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

 

반응형
Posted by blueasa
, |

[링크] https://velog.io/@bnm000215/%EC%9C%A0%EB%8B%88%ED%8B%B0-%EC%9E%90%EB%8F%99%ED%99%94-%EB%B9%8C%EB%93%9C-Git-Action

 

유니티 자동화 빌드 (Git Action)

유니티에서 빌드를 하게 되면 빌드 시간 동안 팀 프로젝트를 할 수 없게 되어버립니다.빌드 시간이 짧으면 큰 타격은 없는데, 빌드 시간이 길어지면 작업을 할 수 없으니 치명적이죠.이번 문서

velog.io

 

반응형
Posted by blueasa
, |

Unity 2021.3.44f1

----

 

Unity Editor의 Scene View에서 Camera의 View Frustum을 볼 수 있게 해주는 스크립트.

View Frustum을 보고 싶은 카메라에 Component로 넣고 실행하면 Scene View에 보인다.

 

using UnityEngine;

public class FrustumViewer : MonoBehaviour
{
// 에디터에서만 작동하도록 define
#if UNITY_EDITOR

    Camera m_Camera = null;
    Vector3[] m_nearCorners = new Vector3[4]; //Approx'd nearplane corners
    Vector3[] m_farCorners = new Vector3[4]; //Approx'd farplane corners
    Plane[] m_camPlanes = null;


    private void OnEnable()
    {
        m_Camera = this.GetComponent<Camera>();
    }

    void Update()
    {
        DrawFrustum(m_Camera);
    }

    void DrawFrustum(Camera _cam)
    {
        if (null == _cam)
            return;

        m_camPlanes = GeometryUtility.CalculateFrustumPlanes(_cam); //get planes from matrix

        Plane temp = m_camPlanes[1]; m_camPlanes[1] = m_camPlanes[2]; m_camPlanes[2] = temp; //swap [1] and [2] so the order is better for the loop
        for (int i = 0; i < 4; i++)
        {
            m_nearCorners[i] = Plane3Intersect(m_camPlanes[4], m_camPlanes[i], m_camPlanes[(i + 1) % 4]); //near corners on the created projection matrix
            m_farCorners[i] = Plane3Intersect(m_camPlanes[5], m_camPlanes[i], m_camPlanes[(i + 1) % 4]); //far corners on the created projection matrix
        }

        for (int i = 0; i < 4; i++)
        {
            Debug.DrawLine(m_nearCorners[i], m_nearCorners[(i + 1) % 4], Color.red, Time.deltaTime, true); //near corners on the created projection matrix
            Debug.DrawLine(m_farCorners[i], m_farCorners[(i + 1) % 4], Color.blue, Time.deltaTime, true); //far corners on the created projection matrix
            Debug.DrawLine(m_nearCorners[i], m_farCorners[i], Color.green, Time.deltaTime, true); //sides of the created projection matrix
        }
    }



    Vector3 Plane3Intersect(Plane p1, Plane p2, Plane p3)
    { 
        //get the intersection point of 3 planes
        return ((-p1.distance * Vector3.Cross(p2.normal, p3.normal)) +
                (-p2.distance * Vector3.Cross(p3.normal, p1.normal)) +
                (-p3.distance * Vector3.Cross(p1.normal, p2.normal))) /
                (Vector3.Dot(p1.normal, Vector3.Cross(p2.normal, p3.normal)));
    }

#endif
}

 

 

[참조] https://grrava.blogspot.com/2014/04/render-view-frustrum-of-camera-in-unity.html

 

Render the view frustum of a camera in Unity

When you select a camera in the Unity editor, gray lines indicate where the view frustum is. When it's deselected the lines are obviously no...

grrava.blogspot.com

 

반응형
Posted by blueasa
, |

Unity 2021.3.42f1

----

 

언젠가부터 에디터의 GameView에서 Resolution을 비율이 아닌 해상도를 선택(예:1920x1080 Landscape)하면 Scale 때문에 한화면에 다 보이지 않는 현상이 발생함.

그래서 Scale을 최소치로 내리는데, 문제는 Play를 실행하면 최소치로 내려놓은 Scale 값이 초기화되면서 화면이 다시 커진다.

그래서 Play 이후에 다시 Scale 값을 내리는 불편함이 생기는데..

원인 및 해결을 위해 찾다보니 아래 [참조]와 같은 내용이 있다.

 

[참조] https://discussions.unity.com/t/game-view-scale-wont-go-lower-than-1-3x-in-16-9-display-mode/922853/18

 

[참조] 글을 보면 GameView를 껐다 다시 키라고 하는데, 해보니 정말로 잘 된다.

그리고, Window 해상도 및 배율 관련 이야기도 나온다.

 

글 내용들과 해결책으로 유추해 봤을 때 현재 상태를 가정해보면 아래와 같을 거라 생각한다.

 

[가정] GameView의 Scale 관련 저장되는 값은 GameView가 최초 켜질 때 결정되고 로컬에 저장된다.

[가정] 에디터가 켜지는 건 GameView 켜지는 것과 무관한다.(위의 가정에서의 초기값 갱신이 안됨)

 

   [예상 플로우]

1) (최초 Unity가 켜지면서) 최초 GameView가 켜지고 초기값이 저장됨.

2) 모니터의 해상도나 배율이 변경됨.

3) Unity Editor를 새로 켜도 GameView가 새로 켜지는 건 아니라서 해상도/배율 관련 저장값이 갱신 안됨.

4) GameView에서 Resolution 값으로 해상도를 셋팅(예:1920x1080 Landscape)하고 Scale값을 최소로 내려서 화면에 Fit 되게 한 후에 Play 버튼을 눌러서 실행해도 Scale 값이 원래 값으로 되돌려짐.

----

5) GameView를 껐다가 새로 켬.

6) GameView Scale 값이 달라진 걸 볼 수 있음(초기값 재저장 된 듯)

 

 

  [결론]

Play 버튼을 눌렀을 때, GameView Scale 값이 설정한대로 고정안되고 변경된다면,

GameView를 껐다가 새로 키자.(Editor 껐다 키는거 아님)

반응형
Posted by blueasa
, |