Exemple #1
0
        /// <summary>
        /// 从 testBundle_path 目录装载指定名称的 asset bundle
        /// </summary>
        /// <param name="bundleName"> asset bundle 文件名 不需要指定目录 </param>
        /// <returns></returns>
        static public AssetBundle LoadBundle(string bundleName)
        {
            string      testData_folder = testBundle_path + PlatformPath.GetPath(Application.platform);
            AssetBundle ab = AssetBundle.LoadFromFile(testData_folder + "/" + bundleName);

            return(ab);
        }
        public void Init()
        {
            Context    context = Context.Unknown;
            ByteBuffer bb      = TestData.LoadResource("suit_metal_dragon_male." + PlatformPath.GetPath(Application.platform).ToLower() + ".texture", out context);

            Assert.IsNotNull(bb);
            Assert.AreNotEqual(context, Context.Unknown);

            TextureUnserializer unserializer = UnserializerFactory.Instance.Create(context) as TextureUnserializer;

            result = unserializer.Parse(bb) as ResourceObjectSingle;
            Assert.IsNotNull(result);
            texture = Schema.Texture.GetRootAsTexture(bb);
        }
Exemple #3
0
 static ResourceObjectMaterial()
 {
     platform = PlatformPath.GetPath(Application.platform).ToLower();
 }
Exemple #4
0
 private ShaderManager()
 {
     coreDataBundle = ".coreData/" + PlatformPath.GetPath(Application.platform) + "/coredata.bundle";
 }