team4 解散, 加入 team11, 开始入坑 egret3d. 崭新的开始

H5 debug 版本加载失败

错误信息 AdManager.js net::ERR_BLOCKED_BY_CLIENT, 原因是被浏览器的广告拦截插件给拦截了, 调整拦截策略或禁用插件可解决。

unity 获取 GameObject 对应的 prefab 路径

1
2
3
4
5
6
GameObject go;
bool isPrefab = PrefabUtility.GetPrefabType(go) == PrefabType.PrefabInstance;
if (isPrefab){
UnityEngine.Object parentObject = PrefabUtility.GetCorrespondingObjectFromSource(go);
string path = AssetDatabase.GetAssetPath(parentObject);
}

问题:

发布流程

打包时版本号是手动修改么?

其他

gitignore 初次打开 20k+ 的变动, 因为 Library 文件夹
egret bake 导出的资源大小输出不对

解析

时间点

LoadingLayer.loadBattleFinal 里往场景中挂了 GameScript 组件

namespaces

  • paper
  • egret3d
  • gltf
  • signals

gltf

egret3d

  • Vector2
  • Vector3
  • Vector4
  • Matrix3
  • Matrix4
  • Quaternion
  • Color
  • Rectangle
  • Box
  • Sphere
  • BaseLight
  • MeshRenderer
  • Shader
  • Texture/ RenderTexture
  • Mesh
  • SkyBox
  • LightShadow
  • DirectionalLight/ SpotLight / PointLight/ RectangleAreaLight / HemisphereLight
  • Fog

  • Transform

  • Camera

    io

  • BinReader
  • BinWriter

paper

BaseComponent

组件基类

  • enabled
  • gameObject

    BaseRenderer

  • raycast()
  • materials

    Clock

  • time
  • now
  • paper.clock

    DisposeCollecter

  • paper.disposeCollecter

    Behaviour

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    /**
    * 脚本组件。
    * - 为了开发的便捷,允许使用脚本组件实现组件生命周期。
    * - 生命周期的顺序如下:
    * - onAwake();
    * - onReset();
    * - onEnable();
    * - onStart();
    * - onFixedUpdate();
    * - onUpdate();
    * - onAnimationEvent();
    * - onLateUpdate();
    * - onBeforeRender();
    * - onDisable();
    * - onDestroy();
    */

GameObject

  • sendMessage
  • sendMessageUpwards
  • broadcastMessage

ECS

  • paper.Application

BaseSystem

  • enabled
  • lifetime Funcs …

Asset

Prefab

  • create

    RawScene

GameObjectGroup

  • static _groups

Scene

managers

SystemManager

  • static getInstance()
  • systems
  • register()

    SceneManager

  • static getInstance()
  • unloadAllScene()
  • scenes

知识索引

gltf

gltf
GLTF——3D图形界的JPEG
tone mapping
gamma 校正

ai’n

工作

成长线修改

等级自动解锁
枪会有插件
插件

待修改的地方

排行榜需要修改
活动需要修改
DPS 新公式是否需要修改

副武器需要在多少级解锁

loading

通用

版本管理

资源

default.res.json

资源处理

zip

zip_load_config.json 配置
zipConfig 中 nozip: true 的部分为新手资源。生成 nozip.json, 优先加载
其他部分生成 zip.json 过了新手关加载

bake 的时候, res.json 不引用 2d/**/sheet/* 的资源
publish 的时候, res.json 不引用 2d/**/import/* 与 2d/**/sheet/*.png 的资源

新手

新手资源分离
新手配置分离
新手关卡资源加载

流程

创建加载图
检查版本 => loadManifast
加载新手资源配置 => newbie.res.json
加载新手zip配置 => loadNoZipBin => nozip.json
创建UI 结点 => createGameUI

显示 LoadingHomeLayer =>
登录: loadUserInfo
getUserInfo
加载新手数据配置: loadNewbie
初始化 UserMode:

1. 进入战斗: LoadBattleDirectly
    加载关卡配置: loadingBattleConfig => guanka01.prefab.json
    加载关卡资源 2d: loadingBattleRes => loadGroup("2dBegin")
    加载场景资源 loadBattleScene =>
                    loadSceneRes =>  guanka01.scene.json
                    initActorList => guai01.prefab.json. bomb.json
                    loadActorAnimations => guai01.ani.bin
    加载枪:     createGun => 

    createGameUI
    startGame

结算界面预加载其他资源
    继续新手关卡 LoadingSceneLayer 开始load
    回主界面: releaseBattle
BattleResult  onEnter => loadLazyRes
2. 加载主界面资源:  loadingHomeRes

老手

zip 配置 => loadZipBin => zip.json
asset.res.json
default.res.json
data.json

缓存清理

待重构

VideoManager

删除资源,及无用代码

newshootLayer=>hitAnimGroup

加载

资源准备工具

资源加载流程

zk_guai02.prefab.json
zk_guai05.prefab.json
zk_guai10.prefab.json


https://leafflow.top/2023/02/07/daily/2019-12/
作者
vollen
发布于
2023年2月7日
许可协议