问题背景: 现在在搞PC端应用开发,我们开发中需要调用系统的窗口以及需要最大化最小化,缩放窗口拖拽窗口,以及设置窗口位置,去边框等功能 解决根据: 使用user32.dll解决 具体功能: Unity中对Windows窗口设置 <1>.unity中调用打开文件窗口和保存窗口: 调用Comdlg32.dll中方法 using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Inte
#if UNITY_EDITOR using System.Collections; using System.Collections.Generic; using System.IO; using System.Text; using UnityEditor; using UnityEngine; public class AnimImport : AssetPostprocessor { StringBuilder sb = new StringBuilder(); //fbx动画导入前的处
问题描述 游戏开发中会有多个场景,有时会有这样的需求,我们需要保证场景跳转但是需要保持某个游戏对象不被销毁,比如:音乐 实现思路 unity中提供了DontDestroyOnLoad(),这个API 使用这个指令一般写在跳转场景之前,写在跳转场景的触发事件中,把背景音乐绑定的对象做成预制体,上面绑定了播放音乐的代码 实现代码 using System.Collections; using System.Collections.Generic; using UnityEngine; using U