1. Ctrl + L 을 눌러 Cursor 채팅 패널을 엽니다. 2. "Normal chat"에서 "Long Context Chat"으로 변경합니다. 3. 프롬프트에 "@codebase를 파악해서 내 코드의 관계와 역할을 머메이드로 시각화해줘" 라고 입력합니다. 4. 노션에서 생성된 코드를 복사하여 붙여넣습니다. 5. 이 시각화는 깃허브 README.MD에서도 볼 수 있으며, 코드 구조를 빠르게 파악하는 데 유용합니다. 6. http://www.mermaidchart.com 여기로 접속해 머메이드 ai에게 더 꾸며달라고 요청합니다.
you are an expert AI programming assistant in VSCode that primarily focuses on producing clear, readable code. You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, and thoughtful answers, and you are a genius at reasoning.
1. Follow the user's requirements carefully and precisely. 2. First, think step-by-step – describe your plan for what to build in pseudocode, written out in great detail. 3. Confirm, then write the code! 4. Always write correct, up-to-date, bug-free, fully functional and working, secure, performant, and efficient code. 5. Focus on **readability** over performance. 6. Fully implement all requested functionality. 7. Leave **NO** to-dos, placeholders, or missing pieces. 8. Ensure the code is complete! Thoroughly verify the final version. 9. Include all required **imports**, and ensure proper naming of key components. 10. Be concise. Minimize any unnecessary explanations. 11. If you think there might not be a correct answer, say so. If you do not know the answer, admit it instead of guessing. 12. Always provide concise answers. 13. Please answer in Korean
Ctrl + i 키 또는 맥에선 Cmd + i 키를 누르셔서 Composer 탭을 열어주신 뒤(아마 작을겁니다)
오른쪽 상단에 Open Control Panel 버튼을 눌러주시면 노트패드가 열립니다.
노트패드창에서 왼쪽탭 상단에 더하기 버튼이 있을텐데 이 버튼을 눌러서 노트 하나 생성합시다.
노트 내용에 아무거나 쓰신 뒤 Ctrl + L 키를 눌러 프롬프트에 들고 갑시다.
이런식으로 방금 만든 노트패드가 @로 추적이 가능합니다.
노트패드를 프롬프트에 포함시켜 이런식으로 결과물을 받아올 수도 있긴하지만
노트패드 작성시에 AI 기능이 있었다면 더 좋지 않을까 싶네요 아직 베타니까 기다려봅시다.
#7 프로젝트 5분만에 분석하는 법
Cursor를 이용해 5분 만에 프로젝트 구조를 파악하는 방법을 알려드리겠습니다.
1. Ctrl + L 을 눌러 Cursor 채팅 패널을 엽니다. 2. "Normal chat"에서 "Long Context Chat"으로 변경합니다. 3. 프롬프트에 "@codebase를 파악해서 내 코드의 관계와 역할을 머메이드로 시각화해줘" 라고 입력합니다. 4. 노션에서 생성된 코드를 복사하여 붙여넣습니다. 5. 이 시각화는 깃허브 README.MD에서도 볼 수 있으며, 코드 구조를 빠르게 파악하는 데 유용합니다. http://www.mermaidchart.com 여기로 접속해 머메이드 ai에게 더 꾸며달라고 요청합니다.
만약에 그냥 List<UniTask>로 선언하고 외부에서 해당 리스트에 Add해보시면 즉시 실행될겁니다.
하지만 아래처럼 List<Func<UniTask> 로 선언하면 델리게이트처럼 함수들을 외부에서 Add해도
즉시 실행 되지 않고 잘 저장 됩니다.
TestUniTask.cs
public class TestUniTask : MonoBehaviour
{
public List<Func<UniTask>> OnEndEvnt = new List<Func<UniTask>>(); // 비동기 메서드 참조
private async void DetectGameEnd()
{
// OnEndEvnt의 모든 함수가 실행 완료될 때까지 대기
if (OnEndEvnt.Count > 0)
{
foreach (var func in OnEndEvnt)
{
await func();
}
}
}
}
위코드는 OnEndEvnt처럼 리스트에 등록된 비동기 Task들이 모두 await이 끝날 때까지 순차적으로 실행하고 기다리는것입니다.
만약 다 실행하고 각자 다 await하고 싶다면?
-> UniTask.Void(async () => { await func(); })를 해서 하나씩 따로 기다리시면 됩니다.
외부 클래스
ClearStage.cs
public class ClearStage : MonoBehaviour
{
private void Start()
{
TestUniTask.OnEndEvnt.Add(ClearStageTask);
}
public async UniTask ClearStageTask()
{
await UniTask.WaitForSeconds(5);
}
}