自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 Unity 光照贴图自动化批量烘焙打包

示例

2020-01-21 11:29:05 916

原创 Unity AssetBundle自动化打包

//先批量创建Prefab private void CreatePrefab(GameObject obj, string path) { //如果已有预设,进行替换(Apply) var objPrefab = PrefabUtility.GetPrefabParent(obj); if (objPrefab != null) ...

2020-01-15 10:23:32 477

原创 Unity Inspector面板只读属性ReadOnly

public class ReadOnlyAttribute : PropertyAttribute{}[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]public class ReadOnlyDrawer : PropertyDrawer{ public override float GetPropertyHeight(S...

2020-01-14 17:39:02 6233 3

原创 Unity 在Scene视图获取点击世界坐标

//在scene界面点击操作 void OnSceneGUI() { if (Event.current.type == EventType.MouseDown && Event.current.alt) { var ray = HandleUtility.GUIPointToWorldRay(Event.curre...

2020-01-14 17:13:06 1794

原创 Unity 对象资源序列化和反序列化

//CreateAssetMenu使得可以直接在project直接点击创建固定格式的Asset文件[CreateAssetMenu(menuName = "CustomEditor/Create Data Instance")]public class Data:ScriptableObject{ public string name; public int age;}//创建...

2020-01-14 16:54:13 374

原创 Unity 编辑器扩展—枚举类型多选搜索UnityAsset文件

枚举搜索类型 [Flags]//表明选择值的集合,可做位运算 private enum SearchType { AnimationClip = 1 << 0, AudioClip = 1 << 1, AudioMixer = 1 << 2, Font = 1 <&lt...

2020-01-14 16:17:43 946

原创 Unity 删除选中Asset文件

var selectObjects = Selection.GetFiltered(typeof(DefaultAsset), SelectionMode.Unfiltered); if (selectObjects != null) { foreach (DefaultAsset obj in...

2020-01-14 15:04:48 1166

原创 Unity 编辑器扩展—文件对话框

var floder= EditorUtility.OpenFolderPanel(Title, floder, defaultFolderName);var dirctory = new DirectoryInfo(floder);var files = dirctory.GetFileSystemInfos();

2020-01-14 14:44:01 745 1

原创 C# 获取系统本地特殊路径

//获取本地桌面路径 var path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

2020-01-14 14:26:28 216

原创 C# 插值排序

void InsertSort(int[] array) { for (var i = 1; i < array.Length; i++) { var index = i; var N = array[i]; whi...

2020-01-13 17:25:57 186

原创 Unity Prefab批量保存

预设物体批量保存

2020-01-13 17:20:55 803

原创 C# File和Directory的一般操作

文件和文件夹的新建、删除、移动、复制、查询、写入新建 File.Create(string path); Directory.CreateDirectory(string path); 删除 File.Delete(string path); Directory.Delete(string path); 移动 File.Move(string sourc...

2020-01-13 15:40:16 446

原创 Winform小应用 获取指定文件夹内的所有子文件名字

这里写自定义目录标题Winform小应用 获取指定文件夹内的所有子文件名字Winform小应用 获取指定文件夹内的所有子文件名字using System;using System.Drawing;using System.Windows.Forms;using System.IO;namespace GetName{ public partial class Form1 :...

2020-01-13 14:37:21 675

原创 C# 斐波那契数列递归与循环算法

斐波那契数列f(n)=f(n-1)+f(n-2) 1、1、2、3、5、8、13、21、34…递归与非递归1递归func(int n){if(n=<1)return 1;return func(n-1)+func(n-2);}2非递归func_1(int n){if(n<=1)return 1;int[] t=new int[n+1];t[0]=1;t[...

2020-01-02 00:06:44 720

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除