문서의 이전 판입니다!


Including scripts in AssetBundles

AssetBundles can c

AssetBundle bundle = www.assetBundle;
// Load the TextAsset object
TextAsset txt = bundle.Load("myBinaryAsText", typeof(TextAsset)) as TextAsset;
// Load the assembly and get a type (class) from it
var assembly = System.Reflection.Assembly.Load(txt.bytes);
var type = assembly.GetType("MyClassDerivedFromMonoBehaviour");
// Instantiate a GameObject and add a component with the loaded class
GameObject go = new GameObject();
go.AddComponent(type);

}</file>

back to AssetBundles Intro

댓글 0

아직 댓글이 없어요. 첫 댓글을 남겨보세요.

연결문서


CC Attribution-Noncommercial-Share Alike 4.0 International 별도로 명시하지 않을 경우, 이 페이지의 내용은 다음 라이선스에 따라 사용할 수 있습니다: CC Attribution-Noncommercial-Share Alike 4.0 International
unity/scriptsinassetbundles.1463818204.txt.gz · 마지막으로 수정됨 저자 115.23.172.67