分场景打包步骤:导入unity中AB包后

1: 指定场景
  2: 指定abname
  3: 指定objinabname
  4: 协同
  5: 委托 void string

unity

先引入命名空间  using LLWHABFW;

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LLWHABFW;
using UnityEngine.SceneManagement;
public class S3LoadAB : MonoBehaviour { private string _abScence = "scenes03";//指定场景 //小写s
private string _aBName = "scenes03/scenes03.ab"; //指定abName
private string _objInAB01 = "Plane.prefab";//指定objIn abName
private string _objInAB02 = "RollerBall.prefab";//指定objInabName
private List<GameObject> _list;
// Use this for initialization
void Start ()
{
_list = new List<GameObject>();
StartCoroutine(AssetBundleMgr.GetInstance().LoadAssetBundlePack(_abScence, _aBName, XXXX));//协同
}
// Update is called once per frame
void Update ()
{
if (Input.GetKeyDown(KeyCode.Space)) //销毁资源
{
for (int i = ; i < _list.Count; i++)
{
Destroy(_list[i]);
}
_list.Clear();
AssetBundleMgr.GetInstance().DisposeAllAssets(_abScence);
SceneManager.LoadScene("");
}
}
private void XXXX(string LLwh) //void string
{
GameObject Plane, Ball;
Plane = AssetBundleMgr.GetInstance().LoadAsset(_abScence, _aBName, _objInAB01, false) as GameObject;
Ball = AssetBundleMgr.GetInstance().LoadAsset(_abScence, _aBName, _objInAB02, false) as GameObject;
_list.Add(Instantiate(Plane));
_list.Add(Instantiate(Ball));
}
}

Unity 分场景打包的更多相关文章

  1. Unity 多场景打包

    本文章由cartzhang编写,转载请注明出处. 所有权利保留. 文章链接:http://blog.csdn.net/cartzhang/article/details/50580641 作者:car ...

  2. Unity自己主动打包工具

    最開始有写打包工具的想法,是由于看到<啪啪三国>王伟峰分享的一张图,他们有一个专门的"工具程序猿"开发各种工具. (ps:说起来这个王伟峰和他的创始团队成员,曾经跟我是 ...

  3. Android分渠道打包(Python 3.4 实现)

    Android批量打包实现有很多方式你可以用Ant,Maven或者Gradle.在处理多个Library和NDK编译的时候配置有些麻烦,且每个渠道都编译一次效率较低.如果没有复杂的分渠道编译需求,我们 ...

  4. Vue项目分环境打包的实现步骤

    转:https://blog.csdn.net/xinzi11243094/article/details/80521878 方法一:亲测真的有效 在项目开发中,我们的项目一般分为开发版.测试版.Pr ...

  5. 使用Maven分环境打包:dev sit uat prod

    使用Maven管理的项目,经常需要根据不同的环境打不同的包,因为环境不同,所需要的配置文件不同,比如database的连接信息,相关属性等等. 在Maven中,我们可以通过P参数和profiles元素 ...

  6. 基于Vue + webpack + Vue-cli 实现分环境打包项目

    需求由来:我公司项目上线发布至服务器分为三个环境分别为测试环境.预发布环境.生产环境:前期做法是项目通过脚步打包时由脚步把域名和后缀名之类的全部替换成要发布的环境所需要的,因为我公司的项目比较大由许许 ...

  7. springboot分环境打包(maven动态选择环境)

    分环境打包核心点:spring.profiles.active pom.xml中添加: <profiles> <profile> <id>dev</id> ...

  8. 前端自动分环境打包(vue和ant design)

    现实中的问题:有时候版本上线的时候,打包时忘记切换环境,将测试包推上正式服务器,那你就会被批了. 期望:在写打包的命令行的时候就觉得自己在打包正式版本,避免推包时候的,不确信自己的包是否正确. 既然有 ...

  9. vue分环境打包配置不同命令

    1.安装cross-env (cross-env能跨平台地设置及使用环境变量)cnpm/npm  i  cross-env -D 2.新建模板 红色的为相关文件 3.配置各个文件 (1)config下 ...

随机推荐

  1. 算法(Algorithms)第4版 练习 1.5.9

    不可能.如果是weighted quick-union的话,6的父节点应该是5,而不是5的父节点是6.

  2. html5新特性contenteditable 属性更容易实现动态表单

    介绍html5新特性的一个属性:contenteditable 作用域全局.所有的块标签都可以,例如:span.p.div.td等标签.但是,不可以作用域<br/>类型的标签. conte ...

  3. Spark- RDD持久化

    官方原文: RDD Persistence One of the most important capabilities in Spark is persisting (or caching) a d ...

  4. Python with MYSQL - sytax problem

    Con= MySQLdb.connect(host=',db='test') cur=Con.cursor() cur.execute('insert into staff_daily(Date,Na ...

  5. linux apt-get remove如何恢复

    linux卸载或删除软件时,若不小心删除到关联的软件,如果想撤销删除操作需要在/var/log/apt/history.log中依次安装删除的软件,具体操作如下: $echo '#!/bin/bash ...

  6. 【leetcode刷题笔记】LRU Cache

    Design and implement a data structure for Least Recently Used (LRU) cache. It should support the fol ...

  7. ffmpeg用法(心得体会还有你见过的用法)

    ffmpeg的常用用法很多,我这里提供的用法有可能有许多地方是你没见过的. 一.ffmpeg合并视频 我经常需要切割再把一些零碎的视频给拼接起来,这样可以省许多磁盘空间.其实用mencoder挺不错的 ...

  8. POJ2406Power Strings (最小循环节)(KMP||后缀数组)

    Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc&quo ...

  9. ACM学习历程—UESTC 1222 Sudoku(矩阵)(2015CCPC H)

    题目链接:http://acm.uestc.edu.cn/#/problem/show/1226 题目大意就是构造一个行列和每个角的2*2都是1234的4*4矩阵. 用dfs暴力搜索,不过需要每一步进 ...

  10. 原 requirements.txt 介绍 & 快捷生成

    requirements.txt介绍   requirements.txt 文件 里面记录了当前程序的所有依赖包及其精确版本号.   这个文件有点类似与Rails的Gemfile.其作用是用来在另一台 ...