2021년 6월 17일 목요일

2021년 6월 15일 화요일

Unity UI Click Check(유니티 UI 클릭체크)

 using UnityEngine.EventSystems;


if(EventSystem.current.IsPointerOverGameObject())
    return;
    
//클릭처리

2021년 6월 14일 월요일

Unity AnimationClip 에니메이션Clip (역재생,재생)

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

public class SimpleAnimationPlayer : MonoBehaviour
{

    public Animation ani;
    public string clip_name;
    public float ani_time;



    private void Update()
    {
        if (Input.GetKeyDown("1"))
        {
            Show();
        }

        if (Input.GetKeyDown("2"))
        {
            Hide();
        }
    }

    public void Hide()
    {
        if (ani_time == ani[clip_name].length)
            return;

        ani_time = ani[clip_name].time;

        func_playAni(ani_timeclip_name);

    }
    public void Show()
    {
        if (ani_time == 0)
            ani_time = ani[clip_name].length;
        else
            ani_time = ani[clip_name].time;

        func_reversPlay(ani_timeclip_name);
    }


    public void func_playAni(float timestring aniName)
    {
        ani[aniName].time = time;
        ani[aniName].speed = 1;
        ani.Play();
    }

    public void func_reversPlay(float timestring aniName)
    {
        ani[aniName].time = time;
        ani[aniName].speed = -1;
        ani.Play();
    }
}

git rejected error(feat. cherry-pick)

 문제 아무 생각 없이 pull을 받지않고 로컬에서 작업! 커밋, 푸시 진행을 해버렷다. push에선 remote와 다르니 당연히 pull을 진행해라고 하지만 로컬에서 작업한 내용을 백업하지 않고 진행하기에는 부담스럽다(로컬작업 유실 가능성) 해결하려...