RindFan's Blog

游戏程序 rindfan.com


  • 首页

  • 标签

  • 分类

  • 归档

  • 在线书籍

  • 搜索

关于UnityEditor.Selection的坑

发表于 2020-04-05 更新于 2022-08-03 分类于 Unity 评论数: 0
本文字数: 406 阅读时长 ≈ 1 分钟

问题介绍

在使用UnityEditor.Selection.objects的时候在Project面板的双栏布局下的左侧面板中选中文件夹,会出现明明已经选中了,但是Selection.objects得到的是空的。

解决方法

经过调试发现使用Selection.assetGUIDs可以兼容这种情况

1
2
3
4
5
6
7
8
9
10
foreach (var obj in Selection.assetGUIDs)
{
string path = AssetDatabase.GUIDToAssetPath(obj);
//如果是文件夹才处理
if (Directory.Exists(path))
{
var characterName = Path.GetFileName(path).ToLower();
animatorGenerator.GenerateController(path, characterName);
}
}

UnityHub破解

发表于 2019-07-27 更新于 2022-08-03 分类于 Unity 评论数: 0
本文字数: 989 阅读时长 ≈ 1 分钟

准备

  • 安装UnityHub
  • 安装nodejs

点击下载UnityHub

点击下载nodejs 10.15.3 长期支持版

修改

安装nodejs后执行以下命令

npm install -g asar

打开UnityHub安装目录,如C:\Program Files\Unity Hub\resources
点击文件–>打开Windows PowerShell,执行以下命令解压app.asar

asar extract .\app.asar app


解压后删除app.asar

修改Unity Hub\resources\app\src\services\licenseService\licenseClient.js
1
2
3
4
5
6
7
8
9
10
getLicenseInfo(callback) {
// load license
// get latest data from licenseCore
//licenseInfo.activated = licenseCore.getLicenseToken().length > 0;//注释这行
licenseInfo.activated = true;//新增这行
licenseInfo.flow = licenseCore.getLicenseKind();
licenseInfo.label = licenseCore.getLicenseKind(true);
licenseInfo.offlineDisabled = licenseCore.offlineDisabled;
licenseInfo.transactionId = licenseCore.getTransactionId();
}

Unity Hub\resources\app\src\services\licenseService\licenseCore.js

1
2
3
4
5
6
7
8
9
10
verifyLicenseData(xml, newfile = false) {
return new Promise((resolve, reject) => {
resolve(true);//新增这行
if (xml === '') {
this.licenseStatus = LICENSE_STATUS.kLicenseErrorFlag_NoLicense;
reject();
return;
}
}
}

centos云服务器配置

发表于 2017-06-08 更新于 2022-08-03 分类于 Linux 评论数: 0
本文字数: 1k 阅读时长 ≈ 1 分钟

Centos服务器配置

必装软件

  • nethogs 网速监控
  • screen 后台运行
  • lrzsz 上传下载
  • htop 进程管理

更改系统编码为中文

  1. vim /etc/profile

  2. 在文件最后加上

    1
    2
    export LC_ALL="zh_CN.UTF-8"  
    export LANG="zh_CN.UTF-8"
  3. source /etc/profile 立即生效

  4. echo $LANG 显示默认编码


安装gcc,g++

1
2
yum  install python34-devel
yum install python-devel

安装python3.4和pip3.4

  1. 添加epel源

    1
    yum install epel-release
  2. 安装Python3.4

    1
    yum install python34
  3. 安装pip3

    1
    2
    yum install python34-setuptools
    easy_install-3.4 -i https://pypi.tuna.tsinghua.edu.cn/simple pip
  4. 之后就可以使用pip3了,例如:

    1
    pip3 install requests
  5. pip还源加速
    Linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改内容如下:

    1
    2
    [global]  
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple

安装mono

1
2
3
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"    
yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ (yum -y install yum-utils)
yum -y install mono-complete

安装jdk

  1. 安装

    1
    rpm -ivh jdk.rpm
  2. 环境变量

    1
    vim /etc/profile

    加入内容如下:

    1
    2
    3
    4
    export JAVA_HOME=/usr/local/jdk1.8.0_131
    CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    export PATH=$JAVA_HOME/bin:$PATH
    source /etc/profile

ArchLinux系统安装过程

发表于 2017-06-08 更新于 2022-08-03 分类于 Linux 评论数: 0
本文字数: 1.9k 阅读时长 ≈ 2 分钟

arch安装配置过程

安装

  1. 分区,使用fdisk ,使用mkfs.ext4格式化分区后的磁盘

  2. 测试网络

    1
    ping -c 4 http://www.baidu.com
  3. 更改系统源

    1
    2
    3
    4
    cd /etc/pacman.d
    sed -i "s/^\b/#/g" mirrorlist
    vim mirrorlist
    然后把163开头的#去掉
  4. 安装系统基础

    1
    2
    3
    4
    pacman -Syy
    pacstrap /mnt base base-devel
    genfstab -U -p /mnt >>/mnt/etc/fstab
    arch-chroot /mnt /bin/bash
  5. 编码和时区

    1
    vim /etc/locale.gen
    • 内容大致修改为:

      1
      2
      3
      en_US.UTF-8 UTF-8
      zh_CN.UTF-8 UTF-8
      zh_TW.UTF-8 UTF-8
    • 设置

      1
      2
      3
      4
      locale-gen
      echo LANG=en_US.UTF-8 > /etc/locale.conf
      ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
      hwclock --systohc --utc
  6. 设置主机名:

    1
    echo archlinuxpc > /etc/hostname
  7. 设置自动连接有线网络

    1
    2
    systemctl start dhcpcd
    systemctl enable dhcpcd
  8. 更改密码,添加用户

    • 修改root密码

      1
      passwd
    • 添加用户

      1
      2
      useradd -m -g users -G wheel -s /bin/bash 用户名
      passwd 用户名
    • 添加sudo

      1
      vim /etc/sudoers
  9. 添加引导

    • 对于UEFI:

      1
      2
      3
      4
      5
      6
      7
      mkdir -p /mnt/boot/EFI  (创建UEFI挂载点)
      mount /dev/sdX(Y) /mnt/boot/efi (挂载UEFI分区,一般情况下使用靠前的分区)
      pacman -S dosfstools efibootmgr
      pacman -S grub
      pacman -S os-prober
      grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
      grub-mkconfig -o /boot/grub/grub.cfg
    • 对于bios

      1
      2
      3
      pacman -S grub
      grub-install /dev/sda --force
      grub-mkconfig -o /boot/grub/grub.cfg
  10. 退出安装

    • 退出前先安装wifi
      1
      2
      3
      4
      5
      6
      pacman -S dialog  (wifi-menu)
      exit
      pacman -S dialog
      umount /mnt/{home,boot}
      umount /mnt
      reboot
  11. 安装驱动

    • 声卡驱动

      1
      2
      pacman -S alsa-utils
      alsamixer #调节音量
    • 安装intel核显

      1
      pacman -S mesa xf86-video-intel
    • 其他驱动

      1
      2
      pacman -S xf86-input-synaptics
      pacman -S xorg xorg-server xorg-xinit xorg-utils xorg-server-utils
  12. 常用安装

    • 常用软件安装

      1
      pacman -S fcitx fcitx-qt unrar p7zip cpio zip unzip leafpad xarchiver firefox firefox-i18n-zh-cn flashplugin
    • 安装常用字体:

      1
      pacman -S ttf-dejavu wqy-zenhei wqy-microhei
    • 安装gnome桌面

      1
      2
      pacman -S gdm gnome gnome-extra
      systemctl enable gdm
    • 安装ntfs磁盘读写

      1
      sudo pacman -S ntfs-3g
    • 使用网络管理

      1
      systemctl enable NetworkManager
    • wifi热点

      1
      sudo pacman -S dnsmasq
  13. 常用配置

    • 输入法配置
      1
      vim ~/.profile

    修改为

    1
    2
    3
    4
    5
    6
    export XIM=fcitx
    export XMODIFIERS="@im=fcitx"
    export GTK_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx
    export XIM_PROGRAM=fcitx
    fcitx &
    • 挂载硬盘不用密码
      1
      vim /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

    把与id=”org.freedesktop.udisks2.filesystem-mount-system”中
    auth_admin_keep改为yes

VSCode配置执行python

发表于 2017-06-08 更新于 2022-08-03 分类于 Tools 评论数: 0
本文字数: 595 阅读时长 ≈ 1 分钟

VSCode 配置

键盘快捷键

1
2
3
4
5
[
{ "key": "ctrl+'", "command": "workbench.action.tasks.terminate" },
{ "key":"ctrl+b", "command": "workbench.action.tasks.build"},
{ "key":"ctrl+shift+b", "command": "workbench.action.toggleSidebarVisibility"}
]

执行python

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
task.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "E:/MyProgram/python/python.exe",
"isShellCommand": true,
"args": [
"${file}"
],
"showOutput": "always",
"options": {
"env": {
"PYTHONIOENCODING": "UTF-8"
}
}
}
RindFan

RindFan

GG Game,Best Game
5 日志
3 分类
8 标签
GitHub E-Mail Weibo
© 2022 RindFan | 5k | 4 分钟
由 Hexo 强力驱动 v3.9.0
|
主题 – NexT.Pisces v7.2.0