돌고래 홈페이지
ID:
PW:


  운영자(2007-05-18 18:13:43, Hit : 880, Vote : 200
 유니티 임시

ADB를 유니티 코드로 불러오기 ===>  unity ProcessStartInfo adb log
https://github.com/dzonatan/Unity3D-LogCat-extension/blob/master/LogCatWindow.cs
http://lo25131.hatenablog.com/entry/2015/09/25/011416
http://m.blog.csdn.net/article/details?id=49818953


BaseMeshEffect 클래스를 이용한 글씨 한자씩 찍기
http://qiita.com/YuMe03/items/2e85712c36b5a108f161

다각형 모드 스프라이트
http://qiankanglai.me/2016/03/05/polygon-sprites/

유니티 카메라 추적
http://kjhweb.tistory.com/category/?page=4

[Unity] uGUI의 World Space를 쉽게 배치하기
http://tsubakit1.hateblo.jp/entry/2016/10/23/191901




uGUI에서 3D 오브젝트를 UI앞에 배치
http://albatrus.com/main/unity/7395
http://megumisoft.hatenablog.com/entry/2016/01/27/235940

유니티에서 월드 좌표에서 Canvas 좌표로 변환 설명
http://albatrus.com/main/unity/7395

Add Event Trigger by code
http://answers.unity3d.com/questions/854251/how-do-you-add-an-ui-eventtrigger-by-script.html

c# 확장 메서드 (유니티도 지원)
https://msdn.microsoft.com/ko-kr/library/bb383977.aspx
https://www.dotnetperls.com/extension

=====================================================================
정적 클래스 및 정적 클래스 멤버
https://msdn.microsoft.com/ko-kr/library/79b3xss3.aspx


C# 정적 생성자
https://msdn.microsoft.com/ko-kr/library/k9x6w0hc.aspx

싱글톤
https://msdn.microsoft.com/ko-KR/Library/ms998558.aspx


유니티 벡터 관련
Rotation to direction vector?
http://answers.unity3d.com/questions/251619/rotation-to-direction-vector.html

Limiting rotation of an object  -- Quaternion.Slerp
http://stackoverflow.com/questions/30023365/how-do-i-limit-head-rotation-in-unity3d-google-cardboard
http://answers.unity3d.com/questions/18680/limiting-rotation-of-an-object.html



카메라 제한
                //transform.localRotation = Quaternion.Slerp(rot, Quaternion.Euler(Vector3.forward), limit);

                var min = -40;
                var max = 40;
                Vector3 v3Rotate = rot.eulerAngles;
                float v1 = v3Rotate.y;
                if (v3Rotate.y > 180)
                    v3Rotate.y -= 360;

                v3Rotate.y = Mathf.Clamp(v3Rotate.y, min, max);
                Debug.Log("Limit  " + v3Rotate.y + "  org   " + v1);
                transform.localEulerAngles = v3Rotate;


VR setting
http://www.leadingones.com/articles/asteroids-2.html

google FPS control
http://www.jianshu.com/p/98c75a2f2b08

    void Test()
    {
        Debug.Log("DDD Test Start");

        Rect rect = GvrViewer.Instance.Viewport(GvrViewer.Eye.Left);
        Matrix4x4 proj = GvrViewer.Instance.Projection(GvrViewer.Eye.Left);
        float fov = 2 * Mathf.Atan(1 / proj[1, 1]) * Mathf.Rad2Deg;
        float screenAspect = (float)Screen.width / Screen.height;
        float aspect = rect.width / rect.height;

        //Camera camera = VRPlayerApp.GetInstance().vrMainCamera.gameObject.transform.Find("Main Camera Left").GetComponent<Camera>();
        //Debug.Log("fov: " + camera.fov + ",  aspect: " + camera.aspect + ",  screenAspect: " + screenAspect);

        GvrProfile.Screen profileScreen = GvrViewer.Instance.Profile.screen;
        float profileAspect = profileScreen.width / profileScreen.height;

        GvrProfile.MaxFOV maxFov = GvrViewer.Instance.Profile.viewer.maxFOV;
        Debug.Log("DDD outer: " + maxFov.outer + "  inner: " + maxFov.inner + "  upper: " + maxFov.upper + "  lower: " + maxFov.lower);

        //Debug.Log("DDD fov: " + fov + ",  aspect: " + profileAspect/2.0f + ",  screenAspect: " + screenAspect);
        Debug.Log("DDD Test End");
    }



제네릭(Generic) UnityEvents
https://docs.unity3d.com/kr/current/Manual/UnityEvents.html
http://answers.unity3d.com/questions/843388/how-to-expose-unityevent-in-editor.html

    [Serializable]
    class movieRotateEvent : UnityEvent<GameObject, float> { }
    [SerializeField]
    movieRotateEvent vrModeRotate;
    [SerializeField]
    movieRotateEvent novrModeRotate;

value swap
http://www.c-sharpcorner.com/UploadFile/0c1bb2/swaping-varaibale-values-in-C-Sharp/
    public static void Swap<t>(ref t x, ref t y)
    {

        t tempswap = x;
        x = y;
        y = tempswap;
    }

유니티  gear vr or cardboard switch
http://www.vrdevs.org/One_Unity_Project_for_GearVR_and_Cardboard

곡선을 따라 움직이는 파티클
https://github.com/fkkcloud/UnityParticleCurveFollow

유니티 터치 Trail
http://pixelnest.io/tutorials/unity-touch-controls/


유니티 로그 막기
http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_QnA_etc&no=3611
https://github.com/pb0/DebugDisabler/blob/master/Debug.cs
http://geekcoders.tistory.com/entry/Unity-유니티-프로그래머가-알아야-할-코드작성법
http://www.systemhook.net/?tag=debug




최적화 Tip1
수학 싸이트

Copyright 1999-2018 Zeroboard / skin by zero