请问Fairygui怎么设置无边框[已解决]

问题1:
FariryUI Unity-SDK 2.3.0
构建了一个登陆UI panel,运行一切正常。
按照网上提供的unity C#原生全屏方式不好使,我在非fairygui的项目上测试成功了无边框的实现。
部分代码片段如下:
//设置当前窗口的显示状态
[DllImport("user32.dll")]
public static extern bool ShowWindow(System.IntPtr hwnd, int nCmdShow);

//获取当前激活窗口
[DllImport("user32.dll", EntryPoint = "GetForegroundWindow")]
public static extern System.IntPtr GetForegroundWindow();
//设置窗口边框
[DllImport("user32.dll")]
public static extern IntPtr SetWindowLong(IntPtr hwnd, int _nIndex, int dwNewLong);
//设置窗口位置,大小
[DllImport("user32.dll")]
public static extern bool SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);

//窗口拖动
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
//窗口大小 以此为例
float windowWidth = 1024;
float windowHeight = 768;
//计算框体显示位置
float posX = (Screen.currentResolution.width - windowWidth) / 2;
float posY = (Screen.currentResolution.height - windowHeight) / 2;
Rect rect = new Rect(posX, posY, windowWidth, windowHeight);
SetWindowLong(GetForegroundWindow(), GWL_STYLE, WS_POPUP);
bool result = SetWindowPos(GetForegroundWindow(), 0, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height, SWP_SHOWWINDOW);

问题2:
我每次在Unity上build项目之后,如果改了一些项目内容,比如窗口大小,再次build的话就不生效了,好像是有缓存还是什么的,就需要修改build settings里面的productname才能生效,如果这个productname之前重复过的名字,又会按照之前的那个配置去弄,请问这是为什么啊?
 
我郁闷了好几个小时了,上面这俩问题我Goole和百度搜了差不多4个小时了,没找到解决办法,求帮忙!
已邀请:

kavenfour

赞同来自:

问题2的重新编译 界面大小等不生效的问题解决了。
On macOS PlayerPrefs are stored in ~/Library/Preferences folder, in a file named unity.[company name].[product name].plist, where company and product names are the names set up in Project Settings. The same .plist file is used for both Projects run in the Editor and standalone players.

On Windows, PlayerPrefs are stored in the registry under HKCU\Software\[company name]\[product name] key, where company and product names are the names set up in Project Settings.

On Linux, PlayerPrefs can be found in ~/.config/unity3d/[CompanyName]/[ProductName] again using the company and product names specified in the Project Settings.

On Windows Store Apps, Player Prefs can be found in %userprofile%\AppData\Local\Packages\[ProductPackageId]>\LocalState\playerprefs.dat

On Windows Phone 8, Player Prefs can be found in application's local folder, See Also: Directory.localFolder

On Android data is stored (persisted) on the device. The data is saved in SharedPreferences. C#/JavaScript, Android Java and Native code can all access the PlayerPrefs data. The PlayerPrefs data is physically stored in /data/data/pkg-name/shared_prefs/pkg-name.xml.

On WebGL, PlayerPrefs are stored using the browser's IndexedDB API.

On iOS, PlayerPrefs are stored in /Library/Preferences/[bundle identifier].plist.
把缓存删掉就行了。

kavenfour

赞同来自:

问题1 去掉边框及透明 已解决。

要回复问题请先登录注册