반응형
- 코드 작성
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ResourceLoad : MonoBehaviour
{
void Start()
{
GameObject obj = Resources.Load("GameObject") as GameObject;
Sprite sprite = Resources.Load("GameObject") as Sprite;
AudioClip audioClip = Resources.Load("GameObject") as AudioClip;
TextAsset textAsset = Resources.Load("GameObject") as TextAsset;
Texture2D texture2D = Resources.Load("GameObject") as Texture2D;
Animator animator = Resources.Load("GameObject") as Animator;
}
}
참고할만한 글
반응형
'개발 > C#' 카테고리의 다른 글
유니티 C# 가변 해상도 대응 Android , IOS 간단 구현 (0) | 2022.08.25 |
---|---|
유니티 C# 베터리 잔량 가져오기 Battery 간단 사용법 (0) | 2022.08.25 |
유니티 C# 로컬 푸시 알림 Local Push Notification 간단 구현 (0) | 2022.08.17 |
유니티 C# 부모 자식 오브젝트 가져오기 GetChild 간단 사용법 (0) | 2022.08.17 |
유니티 C# 애플 로그인 Sign ln with Apple Login 간단 구현 (0) | 2022.08.17 |
유니티 C# 비속어 필터 적용 inputfield 간단 사용법 (0) | 2022.07.14 |
유니티 C# 디버그 로그 종류 Debug.Log 간단 사용법 (0) | 2022.07.13 |
유니티 C# 자주 사용하는 연산자 Operator 모음 (0) | 2022.07.13 |
댓글