티스토리 뷰

Unity

UNITY _ Keijiro_git _ Scoped Registries

잉_민 2023. 6. 12. 13:42
728x90
반응형

어떻게 하라는지 모르겠지만. 내 패키지에 케이지로 가 있어서 쉽게 설치했다.

시간날때 다시 살펴보자

https://docs.unity3d.com/kr/2022.1/Manual/upm-ui-install.html

 

레지스트리에서 설치 - Unity 매뉴얼

참고: Package Manager 창을 통해 패키지를 설치하는 경우 패키지 관리자는 다른 패키지와 해당 종속성을 평가하여 선택한 버전과의 버전 충돌이 발생하는지 확인합니다. 충돌이나 제한 사항이 감지

docs.unity3d.com

 

 

https://github.com/keijiro/OscJack

 

GitHub - keijiro/OscJack: Lightweight C# implementation of OSC server/client

Lightweight C# implementation of OSC server/client - GitHub - keijiro/OscJack: Lightweight C# implementation of OSC server/client

github.com

 

 

카메라 회전값 내보내고싶다.

 

***케이지로가 스크립트 만들어놓음

property sender 스크립트 추가하고 

프로젝트창에서 이거만들고 통신할 다른 컴터 프로그램 포트넘버랑 아이피주소 넣어주면 됨,.

 

통신할 언어 설정이 같아야 그 데이터가 넘어감 

/gyrosc

 

아니면 스크립트를 만들수도 있다.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using OscJack;


public class oscSender : MonoBehaviour
{


    [SerializeField] OscConnection _connection = null;


    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public void dataSend_1()
    {
        print("Click!!!!!1");
        var ip = _connection?.host ?? "";
        var port = _connection?.port ?? 0;

        var client = new OscClient(ip, port);

        string address = "/sound";

        client.Send(address, 1);
        Debug.Log("Play:1");
    }
    public void dataSend_2()
    {
        var ip = _connection?.host ?? "";
        var port = _connection?.port ?? 0;

        var client = new OscClient(ip, port);

        string address = "/sound";

        client.Send(address, 2);
        Debug.Log("Play:2");

    }
    public void dataSend_0()
    {
        var ip = _connection?.host ?? "";
        var port = _connection?.port ?? 0;

        var client = new OscClient(ip, port);

        string address = "/sound";
//location
        client.Send(address, 0);
        Debug.Log("Play:0");

    }
    public void dataSend_location(int value)
    {
        var ip = _connection?.host ?? "";
        var port = _connection?.port ?? 0;

        var client = new OscClient(ip, port);

        string address = "/location";

        client.Send(address, value);
        Debug.Log("MICSPEAKER"+ value);

    }

}

이런식으로 코드만들고

아까만들은 OscConnection 컴포넌트에 끌어다 넣는다 .

끝.

728x90
반응형

'Unity' 카테고리의 다른 글

Unity_2022_Spline  (0) 2023.07.30
Unity_VR_oculus _UI _Click  (0) 2023.06.14
Unity_ Vector 3 _ CSV file  (0) 2023.06.10
unity _ VR _oculus _ thumbstick _ joystick 회전  (0) 2023.06.07
Unity_Oculus_VR  (0) 2023.06.05
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함
반응형