public class GameManager : MonoBehaviour {
void MethodA() {
LoadingManager.Loading();
}
}
public class LoadingManager : MonoBehaviour {
public static void Loading() {
// 대충 구현
}
}
위같은 코드 짰는데
MethodA 에서 Playing 호출한다음 Playing 에서 특정 조건이 됐을때 MethodA 함수가 다시 진행됐으면 좋겠음
서버 관련해서 비동기 호출 구현할때, 예를 들면 GPGS 구현할 때
Social.localUser.Authenticate( ( bool success ) => {
if ( success ) {
Debug.Log("GPGS Login Succeed");
}
else {
Debug.Log("GPGS Login Failed : Authenticate Error");
return;
}
});
}
위에 코드에서 Social.localUser.Authenticate
이거처럼 비동기로 진행하다가 얘가 딱 success (값은 상관없이) 뱉어내면 밑에 if 문으로 이어지잖아
go to definition 해서 내부 살펴봐도 모르겠음 ㅠ
아 함수포인터부터 제대로 파악하고 넘어가야하나
delegate와 람다식 이라는 두개의 키워드로 검색해서 공부해보길 추천함
너무 멍청했네 걍 Action 매개변수로 받고 호출하면 됐는데 ㅠ
멍청한거 현재진형행인듯 ㅋㅋ