차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판다음 판 | 이전 판 | ||
unity:scriptsinassetbundles [2015/05/23 14:52] – 링크가 옮기기 작업 때문에 적응했습니다 66.249.79.60 | unity:scriptsinassetbundles [2018/02/22 11:34] (현재) – 바깥 편집 127.0.0.1 | ||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | {{tag> | ||
======Including scripts in AssetBundles====== | ======Including scripts in AssetBundles====== | ||
- | AssetBundles can contain scripts as TextAssets but as such they will not be actual executable code. If you want to include code in your AssetBundles that can be executed in your application it needs to be pre-compiled into an assembly and loaded using the Mono Reflection class (Note: Reflection is not available on iOS). You can create your assemblies in any normal C# IDE (e.g. Monodevelop, | + | AssetBundles can c |
- | + | ||
- | <file csharp> | + | |
- | IEnumerator Start () { | + | |
- | // Start a download of the given URL | + | |
- | WWW www = WWW.LoadFromCacheOrDownload (url, 1); | + | |
- | + | ||
- | // Wait for download to complete | + | |
- | yield return www; | + | |
- | + | ||
- | // Load and retrieve the AssetBundle | + | |
AssetBundle bundle = www.assetBundle; | AssetBundle bundle = www.assetBundle; | ||
줄 30: | 줄 21: | ||
[[AssetBundlesIntro|back to AssetBundles Intro]] | [[AssetBundlesIntro|back to AssetBundles Intro]] | ||
- | {{tag> | ||
* 출처: [[http:// | * 출처: [[http:// | ||