이렇게 Vector3 반환하는 메소드인데
다른 메소드에서 이 메소드의 반환값을 Vector3.zero로 지정시키는 함수를 만들고 싶은데 혹시 가능한거야?
답변 고마워!!
밤이되니까 요상한 질문하는 애들이 늘어나네
public void SetValueFromOutside(){ isOtherValue = true; otherValue = new Vector3(18,18,18);}bool isOtherValue = false;Vector3 otherValue;public Vector3 GetPosition{ if(isOtherValue == true) return otherValue; return Vector3.zero;}
헉 너무 잘들어온다 고마워!
밤이되니까 요상한 질문하는 애들이 늘어나네
public void SetValueFromOutside(){ isOtherValue = true; otherValue = new Vector3(18,18,18);}bool isOtherValue = false;Vector3 otherValue;public Vector3 GetPosition{ if(isOtherValue == true) return otherValue; return Vector3.zero;}
헉 너무 잘들어온다 고마워!