摘要: 开发目的:unity里模型材质贴图处理起来很麻烦,当模型数量很多时会浪费很多时间。(目前支持2018.3以上版本) 目标:导入模型后自动创建材质,自动赋予贴图,修改模型和贴图导入设置属性 本文参考【技术美术小技巧】 美术资源的批量管理_哔哩哔哩_bilibili up主工具代码地址https://g 阅读全文
posted @ 2021-12-31 16:00 wsfw 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 使用Json存储在在本地 using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; using Newtonsoft.Json; using System; usin 阅读全文
posted @ 2021-05-29 19:19 wsfw 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 许多单机游戏都带有游戏内按键修改功能,今天就来实现一个。其本质上还是对KeyCode 进一步封装。 配置简单方便如下图: 我将按键分为3种: 1、按下或持续按下会触发。 2、带有值的输入,当按下时会持续增加,松开时会不断减少,值会有一个范围,超出范围将会是边界那个值。 3、类似Horizontal 阅读全文
posted @ 2021-04-05 15:11 wsfw 阅读(1800) 评论(0) 推荐(0) 编辑
摘要: 挂载MapBoxColider的物体Position 设置为0,0,0,总体没什么难度。 using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraControl 阅读全文
posted @ 2021-04-02 23:04 wsfw 阅读(181) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class Cameracontroller : MonoBehaviour { public fl 阅读全文
posted @ 2021-03-22 09:09 wsfw 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 从UE4资产操作导出fbx,直接导入unity角色的朝向不对(角色趴在地上走)。 UE4的坐标是以z轴朝上,x朝前,y轴朝右,unity 的坐标是以y轴朝上,z轴朝前,x轴朝右。 只需将角色模型导入blender等DCC软件,原封不动的导出(可能是DCC软件在导入Fbx模型会重新计算坐标),再导入u 阅读全文
posted @ 2021-02-27 16:46 wsfw 阅读(1219) 评论(0) 推荐(0) 编辑
摘要: 配合上眼睛转动看向相机,就可以给角色赋予灵魂。 使用控制骨骼旋转。 首页先要将骨骼Offset调整合适和值,使 控制物体的旋转轴分别对应角色的旋转方向。 然后通过计算相机和角色不同方向的角度,赋予ik控制对象,控制骨骼旋转。 代码如下: using System.Collections; using 阅读全文
posted @ 2021-02-20 22:36 wsfw 阅读(213) 评论(0) 推荐(0) 编辑
摘要: using System.Collections; using System.Collections.Generic; using UnityEngine; public class MiniMap : MonoBehaviour { public Transform miniMapRange; p 阅读全文
posted @ 2021-02-18 20:03 wsfw 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 支持按键输入WASD,带有方向指示 脚本挂在Handle上,其它的设置 using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Eve 阅读全文
posted @ 2021-02-18 18:38 wsfw 阅读(114) 评论(0) 推荐(0) 编辑
摘要: AI控制,AI物体挂载,负责通过视觉/听觉侦查的敌人,记录寻路点。 using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; public class AICon 阅读全文
posted @ 2021-02-07 22:23 wsfw 阅读(75) 评论(0) 推荐(0) 编辑