Unity/유니티 프로그래밍 맨텀 2018. 11. 13. 14:50
1. ABC 임포터 패키지를 임포트https://github.com/unity3d-jp/AlembicForUnity/releases 2. 영상과 같이 따라하면 됨.https://www.youtube.com/watch?v=zHaCIVkqrFU - 타임라인 생성하고, 오른쪽 클릭해서 + UTJ.Alembic - Alembic Track 을 추가- 생성된 Shot을 클릭 한 뒤, Inspector에서 StreamPlayer를 Abc 프리팹으로 설정 #. 해당 플러그인은 모바일은 지원하지 않는다.
Unity/유니티 프로그래밍 맨텀 2018. 11. 11. 16:38
구조체는 선언할 때 Serializable을 선언해야 인스펙터에 노출됨. 1234567891011121314151617181920212223 using System; [Serializable] public struct CardSt { public int num; public string name; public ActiveType ActiveType; public CardType CardType; public string explain; public Sprite sprite; public CardSt(int _num, string _name, ActiveType _ActiveType, CardType _CardType, string _explain, Sprite _sprite) { num = _num; n..
Unity/유니티 프로그래밍 맨텀 2018. 6. 19. 11:23
QualitySettings.antiAliasing = antialiasing*2; // 0 : 안함 / 2 : x2 / 4 : x4 인것에 주의. QualitySettings.masterTextureLimit = 0; // 텍스쳐 정상사이즈 QualitySettings.masterTextureLimit = 1; // 반사이즈 QualitySettings.vSyncCount = 1; // 수직동기화 ON QualitySettings.vSyncCount = 0; // 수직동기화 OFF Application.targetFrameRate = 30; // 30프레임 Application.targetFrameRate = 60; // 60프레임 AudioListener.volume = 0.5f; // 볼륨 0~1f
Unity/유니티 프로그래밍 맨텀 2018. 6. 11. 18:39
123456789101112131415 void Update() { if (Input.GetMouseButtonDown(0)) { RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); Physics.Raycast(ray, out hit); if (hit.collider != null) { CurrentTouch = hit.transform.gameObject; EventActivate(); } } }Colored by Color Scriptercs
Unity/유니티 프로그래밍 맨텀 2018. 6. 8. 13:50
[ A : Update 이용한 타입 ] 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556using TMPro;using UnityEngine; public class SpeechManager : MonoBehaviour{ [Header("[ Reference ]")] public TextMeshProUGUI txt; [Header("[ data ]")] public string printString; private int index = 0; private const float WAIT_TIME = 0.05f; // 딜레이 private float waitTimer = 0..
Unity/유니티 프로그래밍 맨텀 2018. 6. 7. 18:01
유니티 러닝 쪽을 참고하는게 빠를듯! https://learn.unity.com/tutorial/touch-input-for-mobile-scripting-1#5cf1ffb5edbc2a4ef4fb2e3a EventSystem.current.IsPointerOverGameObject() == true 에서 리턴해주면 유아이 위에서는 작동안하게 할 수 있다. using UnityEngine; public class TouchCameraControl : MonoBehaviour { public RectTransform rect; private Vector2 delta; void Update() { //if (EventSystem.current.IsPointerOverGameObject() == true) //..