1. 초기화 1) Awake() 게임 오브젝트 생성할때 최초로 1번 실행되는 함수 using System.Collections;using System.Collections.Generic;using UnityEngine;public class LifeCycle : MonoBehaviour{ void Awake() { Debug.Log("플레이어 데이터가 준비되었습니다."); }} 가장 먼저 실행되긴하네 2)Start() 업데이트 시작 직전, 최초 1번 실행 using System.Collections;using System.Collections.Generic;using UnityEngine;public class LifeCycle : MonoBehaviour{ voi..
enumerate가 index와 원소를 동시에 열거해서 (ind,원소)로 순회할 수 있다는거 기본인데 for ind, e in enumerate(int_list): print(ind) print(e) 하지만 때로는 index가 1부터 시작하고 싶을 때가 있다. 이럴때 for ind,e in enumerate(int_list): ind += 1 print(ind) print(e) 이러지말고 enumerate(int_list,start = 1)로 start 옵션에 시작하고 싶은 값을 주면 된다 예시 코드) members = ['민수', '영희', '철수'] for idx, member in enumerate(members, start=1): print(idx, member) 1 민수 2 영희 3 철수