SceneBaseType = { Unknown = 0, Monster = 1, Role = 2, Other = 4, Fake_Role = 5, --假人 MainRole = 8, Pet = 7,--明日AI娘 FallingItem = 13, Npc = 6, Door = 14, Horse = 9,--明日坐骑 Drop = 10, JumpPoint = 11, WayPoint = 12, Baby = 15, --宝宝子女 FPearl = 16,--明日宝具 Evil = 17, --守护 Grave = 18, --墓碑怪 FGun = 19,--明日磁炮(ai娘) FCloud = 20,--明日星翼(ai娘) FArmour = 21,--明日幻甲(ai娘) FWing = 22,--明日炫翼 FWeapon = 24,--明日进阶武器 Pokemon = 25,--宠物 Equip = 26,--装备 GWFollower = 27,--本服团战采集跟随物 Galaxy = 28, --星辰 WarSoul = 29,--战魂 Baby_Horse = 30,-- 宝宝的载具 Baby_Include_Horse = 31,-- 骑着载具的宝宝 JumpOneStep = 32,--跳一跳跳台 God = 33,--神座 --显示形象的同时 显示其坐骑 Include_Horse = 50, HookRole = 51, --挂机假人 Build = 81,--家园建筑 Furniture = 82,--家园家具 All = 100, AssisitPokemon = 120,--宠物副本助战宠物 BuildBaby = 130 , --家园建筑宝宝 Partner = 140, OtherGoods = 150, --其他模型 MapModel = 160, --世界地图 } --模型挂接点 AttachNode = { Head = "head", LSanp = "lsanp", RSanp = "rsanp", LHand = "lhand", RHand = "rhand", BHand = "bhand", Root = "root", LFoot = "lfoot", RFoot = "rfoot", Waist = "waist", RWeapon = "bone_skill", --右手武器的技能挂点 LWeapon = "root", LForearm = "L_Forearm", --左手臂的技能挂点 SceneObj = "SceneObj", Gyro = "gyro", Ride_Root = "ride_root", Wing = "wing", Buff = "buff", Ride = "ride", L_Toe0 = "L_Toe0", HIT = "hit", --左腿 Bone001 = "Bone001", bone00 = "bone00", } --特效挂接点 前面10个表示模型身上的挂点 11 12 13表示三个位置的武器挂点 14坐骑挂接点 15模型最顶级挂接点 脱离模型 不受模型旋转的影响 ParticleAttachNode = { [1] = AttachNode.Head, [2] = AttachNode.LSanp, [3] = AttachNode.RSanp, [4] = AttachNode.LHand, [5] = AttachNode.RHand, [6] = AttachNode.BHand, [7] = AttachNode.Root, [8] = AttachNode.LFoot, [9] = AttachNode.RFoot, [10] = AttachNode.Waist, [11] = AttachNode.RWeapon, [12] = AttachNode.LWeapon, [13] = AttachNode.LForearm, [14] = AttachNode.Ride, [15] = AttachNode.SceneObj, [16] = AttachNode.Ride_Root, [17] = AttachNode.Wing, [18] = AttachNode.Buff, [19] = AttachNode.L_Toe0, [20] = AttachNode.HIT, [21] = AttachNode.Bone001, [22] = AttachNode.bone00, } --特效挂接点,挂点名转attach_type ParticleAttachNodeNameToType = { ["head"] = 1, ["lsanp"] = 2, ["rsanp"] = 3, ["lhand"] = 4, ["rhand"] = 5, ["bhand"] = 6, ["root"] = 7, ["lfoot"] = 8, ["rfoot"] = 9, ["waist"] = 10, ["bone_skill"] = 11, --["root"] = AttachNode.LWeapon, ["L_Forearm"] = 13, ["ride"] = 14, ["SceneObj"] = 15, ["ride_root"] = 16, ["wing"] = 17, ["buff"] = 18, ["L_Toe0"] = 19, } ObjMaxCache = { Monster = 45, OtherRole = 30, --原本是30,但是域外赤炎战场是多人PK,为了不爆内存,改为20 Partner = 30, Other = 30, NPC = 20, Sprite = 30, Pet = 20, Baby = 20, DropItem = 10, PS_effect = 5, ---缓存的粒子特效 Evil = 1, Grave = 10, HookRole = 10, Pokemon = 10, AssisitPokemon = 10, GWFollower = 10, -- JumpOneStep = 5, -- } --[[ 武器装备情况 1:左边武器 2:右边武器 3:后边武器 4:左右两边武器 5:左后右三边武器 ]] WeaponProvideType = { SingleLeftHand = 1, SingleRightHand = 2, BehindHand = 3, BothHand = 4, ThirdHand = 5, } --每个对象类型的武器装备情况 WeaponCountInfo = { role = { [1] = WeaponProvideType.BothHand, [2] = WeaponProvideType.BothHand, [3] = WeaponProvideType.BothHand, [4] = WeaponProvideType.BothHand, }, } --时装部件位置 FashionPartPos = { Clothe = 1, Weapon = 2, Head = 3, Hat = 4, wing = 5, light = 8, } --光武类型 LightWeaponPos = { None = 0, SpecaWeapon = 1, LightWepon = 2, } --模型部件前缀名字 --[[ 1 衣服 2 左手 3 右手 4后手 5阴影 6头 7翅膀 8家具 17守护 ]] ModelPartName= { [1] = "model_clothe_", [2] = "model_weapon_l_", [3] = "model_weapon_r_", [4] = "model_weapon_b_", [5] = "model_shadow_", [6] = "model_head_",--这个应该叫头发 [7] = "model_servant_", [8] = "model_clothe_", [9] = "model_mount_", [15] = "model_child_",--宝宝 [16] = "model_talisman_",--明日宝具 [17] = "model_fairy_",--守护 [19] = "model_sweapon_",--明日磁炮(ai娘) [20] = "model_swing_",--明日星翼(ai娘) [21] = "model_sfashion_",--明日幻甲(ai娘) [22] = "model_wing_",--明日炫翼 [24] = "model_weapon_",--明日进阶武器 [25] = "model_pet_",--宠物 [26] = "model_equip_",--装备 [27] = "model_hat_",--头饰(不是头发) [28] = "model_pearl_",--星辰 [29] = "model_egg_",--战魂 [30] = "model_childcar_",-- 宝宝载具 [33] = "model_god_",-- 神座 [160] = "model_map_",-- 世界地图 } --根据不同的模型类型取得对应模型ab包的名字 ModelABName = { [SceneBaseType.Monster] = "scene_monster", [SceneBaseType.Role] = "scene_role", [SceneBaseType.MainRole] = "scene_role", [SceneBaseType.Pet] = "scene_pet", [SceneBaseType.FallingItem] = "scene_fall", [SceneBaseType.Npc] = "scene_npc", [SceneBaseType.Door] = "scene_door", [SceneBaseType.Partner] = "scene_partner", [SceneBaseType.Baby] = "scene_pet", [SceneBaseType.Equip] = "scene_equip", [SceneBaseType.Evil] = "scene_Evil", [SceneBaseType.God] = "model_god", [SceneBaseType.MapModel] = "model_map", } --场景模型旋转角度 SceneRotateX = 0 --模型和地面夹角 SceneRotateY = 180 --模型和屏幕朝向角度 SceneRotateZ = 0 DungeonCamera = { Height = 15, DistanceWithMainRole = -17.5, SceneRotate = 38, fieldOfView = 35, } --场景对象高度 SceneObjHeight = { Obj = 0, Particle = 0, } --场景平面旋转角度 SceneXZRotate = 0 --场景对象模型缩放大小 SceneModelScale = 1 --界面模型显示缩少倍数 UIModelScale = 1.4 --触发摄像机左右旋转的划屏距离 CameraRotateByScreen = 20 --场景物体深度 SceneDepth = { Obj = 1000, Map = 16000, Sight = 18000, Sky = 20000, } --怪物类型 MonsterType = { NORMAL = 0, --怪物 COLLECT = 1, --采集物品 TASK_COLLECT = 2, --任务采集怪 ESCORT = 3, --护送怪 PICK = 4, --拾取怪 PRICE = 5, --赏金怪 ATT = 6, --进击怪 TOWER = 7, --塔防怪 UD_COLLECT = 8, --不死采集怪 AUTO_MON = 9, --不死采集怪 MISSION_COLLECT = 10, --副本采集怪,绝对可以攻击 CSGWAR = 11, --跨国团战的怪 } BossType = { NORMAL = 0, --普通Boss Wild = 1, --野外Boss Valhalla = 2, --英灵殿Boss MoneyBoss = 3, --赏金幻魔 UnDead = 5, --不死boss DesertedBoss = 9, -- 废都boss DesertedMonster = 10, --废都精英怪 } --点击怪物显示对话内容对应的npcid MonsterShowDialogWithNpcId = { } --降神衣服资源Id GodClothesResId = { } --区域格子标识 AreaDataIndex = { BlockType = 1, WalkType = 2, SafeType = 4, WaterType = 8, SWingType = 64, IndoorType = 128, JumpType = 256, } --服务器区域格子映射标识 ServerAreaIndex = { [0] = AreaDataIndex.WalkType, [1] = AreaDataIndex.BlockType, [5] = AreaDataIndex.SafeType, } --移动类型 MOVE_TYPE = { NORMOL_MOVE = 0, --正常走路 JUMP = 1, --跳跃 ACCELERATE = 2, --任务加速 FLASH = 3, --闪现闪避 TASK_JUMP = 4, --任务三段跳 RUSH = 5, --冲刺 BLINK = 6, --瞬移 } --场景类型 取自后端宏定义 SCENE_TYPE = { NORMAL = 0, --主城(普通场景) OUTSIDE = 1, --野外场景 DUNGEON = 2, --副本场景 WORLD_BOSS = 3, --世界BOSS场景 GUILD = 4, --公会场景 ACTIVE = 5, --活动场景(通用) VOID_FAM = 6, --无尽领域 REWARD_BOSS = 7, --赏金幻魔场景 GWAR = 8, --本服公会战 TYPE_3V3 = 12, --3v3 DRUMWAR = 13, --钻石大战 TYPE_1VN = 14, --1VN DESERTED = 18, --星域幻魔 BOSSHOME = 20, --boss之家 } --是否显示模型或者特效的具体信息 function ShowModeOrParticleInfo() if RuntimePlatform == nil or (SystemRuntimePlatform.IsAndroid() or SystemRuntimePlatform.IsIphone()) then return false end return true end function PrintParticleInfo(gameObject) if ShowModeOrParticleInfo() and gameObject then local particleSystems = gameObject:GetComponentsInChildren(typeof(UnityEngine.ParticleSystem)) local child_count = 0 local function getChildCount(transform) if transform and transform.childCount > 0 then child_count = child_count + transform.childCount for i = 0, transform.childCount - 1 do getChildCount(transform:GetChild(i)) end end return end getChildCount(gameObject.transform) local particle_count = 0 for i = 0, particleSystems.Length - 1 do local ps = particleSystems[i] particle_count = particle_count + ps.particleCount end if particle_count > 100 or child_count > 10 then logWarn("particle "..gameObject.name .. " particle_count is ", particle_count, "child count =", child_count) end end end function PrintSkinMeshInfo(skin_mesh_renderer, limit) if ShowModeOrParticleInfo() and not IsNull(skin_mesh_renderer) then limit = limit or 1000 if skin_mesh_renderer.sharedMesh and skin_mesh_renderer.sharedMesh.vertexCount > limit then logWarn("skin_mesh "..skin_mesh_renderer.gameObject.name .. " vertexCount is ", skin_mesh_renderer.sharedMesh.vertexCount) end end end ASSETS_LEVEL = { LOW = 0, NORMAL = 1, HIGHT = 2, } --模型部件位置 ModelPartPos = { Clothe = 1, Weapon = 2, HeadWear = 3, } --[[ pos:模型部件位置 name:模型部件前缀名字 ]] UIModelConfig = { } --[[ 单一模型显示,如武器, 鞋子等 size: 模型显示区域的大小 rotate:模型旋转角度, can_rotate: 是否可以拖动旋转 position:模型在显示区域内的位置 scale:放大缩小,基值是100 ]] UIPartModelConfig = { } --有些怪物配置的是主角的模型,不添加头发会发生变色 SupportXRayMonster = { } --捕蝶活动武器 ButterflyWeapon = { } --钓鱼活动武器 FishingWeapon = { } --宝具高度 SpriteSkinRenderHeight = { } NoSupportXRayModel = { } --用特效表现的模型 IsParticleModel = { } --角色身上内置特效(包括将神) NoMainroleRemoveParticle = { } --武器内置特效 NoMainroleRemoveWeaponParticle = { } --坐骑内置特效 NoMainroleHorseRemoveParticle = { } --翅膀内置特效 NoMainroleWingRemoveParticle = { } --飞鞋传送表现配置 FLY_SHOE_DISTANCE = { NormalMoveDistance = 1800, --小于此距离直接走过去,优先级1 TwoJumoDistance = 2400, --小于此距离两段跳过去,优先级2 ThreeJumpDistance = 4000, --小于此距离三段跳过去,超过它则飞天传送,优先级3 } XRayShaderMode = { -- ["Custom/mb_flowalphablendmask"] = "mb_flowalphablendmask_xray", -- ["Custom/mb_alpha blend"] = "mb_alphablend_xray", -- --["Unlit/AlphaTexture"] = "XRayEffect", -- ["Unlit/Texture"] = "XRayEffect", -- ["Custom/mb_flowalphablendmaskui"] = "mb_flowalphablendmask_xray", } InXRayShaderMode = { -- ["Custom/mb_flowalphablendmask_xray"] = true, -- ["Custom/mb_alphablend_xray"] = true, -- ["ApcShader/XRayEffect"] = true } InTransTexToAlphaShader = { -- ["Custom/mb_alphablend_xray"] = true, -- ["Custom/mb_alpha blend"] = true, } UIParticleMaskShader = { Res = { -- ["ui_objecticon01"] = true, -- ["ui_objecticon02"] = true, -- ["ui_objecticon03"] = true, -- ["ui_objecticon04"] = true, -- ["ui_objecticon05"] = true, -- ["ui_objecticon06"] = true, -- ["ui_objecticon07"] = true, -- ["ui_objecticon08"] = true, -- ["ui_objecticon09"] = true, -- ["ui_objecticon10"] = true, -- ["ui_objecticoncircle01"] = true, -- ["ui_effect_hunzhu_icon1"] = true, -- ["ui_effect_hunzhu_icon2"] = true, }, Shader = { -- ["Particles/Additive"] = "Mask_ParticleAdd", -- ["Particles/Alpha Blended"] = "Mask_ParticleAlphaBlend", -- ["Custom/mb_flowadd_add"] = "mb_flowadd_add_mask", -- ["Custom/mb_uvrolladd_culloff"] = "mb_uvrolladd_culloff_mask", -- ["Custom/mb_alphablend_front"] = "mb_alphablend_front_mask", }, } --配置哪些场景预加载其他职业的技能特效 PreloadOtherCareerSkillParticleScene = { } --不剔除动画的怪物 AlwaysAnimateMonster = { [10010102] = true, [10020101] = true, [10020104] = true, [10050103] = true, [10100101] = true, [10040101] = true, [10040102] = true, } --带动态骨骼的主角模型 IsDynamicModel = { --创角 [1999] = true, [2999] = true, [3999] = true, [4999] = true, --角色 [1000] = true, [1004] = true, [1007] = true, [1011] = true, [1012] = true, [2004] = true, [2007] = true, [2008] = true, [2009] = true, [2010] = true, [2011] = true, [2012] = true, [3000] = true, [3004] = true, [3007] = true, [3011] = true, [3012] = true, [4004] = true, [4007] = true, [4008] = true, [4009] = true, [4010] = true, [4011] = true, [4012] = true, } --带动态骨骼的AI娘模型 IsDynamicServantModel = { [1000] = true, [1001] = true, [1002] = true, [1003] = true, [1004] = true, [1005] = true, [1006] = true, [1007] = true, [1008] = true, [1009] = true, [1010] = true, [1011] = true, } --活动镜像场景Id(当前玩法状态码 也就是错误码) SceneActivityMirrorSceneId = { None = 0, --无活动 PkRank = 2800010, --竞技场 Dungeon = 6100033, --副本 DungeonMany = 2150014, --跨服组队玩法 } --场景传送模式 SceneTransType = { Server = 0, --服务端传送 Fly = 1, --小飞鞋 World = 2, --大世界传送(到场景出生点) GateNear = 3, --传送门走相邻点 GateAny = 4, --传送门到达任意场景(需要发坐标给服务端计算最近的出生点) }