网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
08月13日漏签0天
unity3d吧 关注:117,225贴子:562,911
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 14回复贴,共1页
<<返回unity3d吧
>0< 加载中...

发布后,如何让程序保持置顶

  • 只看楼主
  • 收藏

  • 回复
  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼


  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
RT


2026-08-13 23:52:39
广告
不感兴趣
开通SVIP免广告
  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
怎样能让后台的软件的消息不顶开unity发布后的程序


  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
单机版贴吧


  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
没有人吗


  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
人工顶贴


  • 100°C自来水
  • Particle
    8
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
有人吗


  • 梧桐树下
  • Prefab
    5
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
什么意思


2026-08-13 23:46:39
广告
不感兴趣
开通SVIP免广告
  • 莫菲奥亚历山大
  • Renderer
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
研究一下user32.dll,里面应该有


  • 王跳河
  • Shader
    12
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class AlwaysOnTop : MonoBehaviour {
#region WIN32API
public static readonly System.IntPtr HWND_TOPMOST = new System.IntPtr(-1);
public static readonly System.IntPtr HWND_NOT_TOPMOST = new System.IntPtr(-2);
const System.UInt32 SWP_SHOWWINDOW = 0x0040;
[StructLayout(LayoutKind.Sequential)]
public struct RECT {
public int Left, Top, Right, Bottom;
public RECT(int left, int top, int right, int bottom) {
Left = left;
Top = top;
Right = right;
Bottom = bottom;
}
public RECT(System.Drawing.Rectangle r)
: this(r.Left, r.Top, r.Right, r.Bottom) {
}
public int X {
get {
return Left;
}
set {
Right -= (Left - value);
Left = value;
}
}
public int Y {
get {
return Top;
}
set {
Bottom -= (Top - value);
Top = value;
}
}
public int Height {
get {
return Bottom - Top;
}
set {
Bottom = value + Top;
}
}
public int Width {
get {
return Right - Left;
}
set {
Right = value + Left;
}
}
public static implicit operator System.Drawing.Rectangle(RECT r) {
return new System.Drawing.Rectangle(r.Left, r.Top, r.Width, r.Height);
}
public static implicit operator RECT(System.Drawing.Rectangle r) {
return new RECT(r);
}
}
[DllImport("user32.dll", SetLastError = true)]
private static extern System.IntPtr FindWindow(String lpClassName, String lpWindowName);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetWindowPos(System.IntPtr hWnd, System.IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
#endregion
// Use this for initialization
void Start() {
AssignTopmostWindow(CONSTANT_WINDOW_TITLE_FROM_GAME, true);
}
public bool AssignTopmostWindow(string WindowTitle, bool MakeTopmost) {
UnityEngine.Debug.Log("Assigning top most flag to window of title: " + WindowTitle);
System.IntPtr hWnd = FindWindow((string)null, WindowTitle);
RECT rect = new RECT();
GetWindowRect(new HandleRef(this, hWnd), out rect);
return SetWindowPos(hWnd, MakeTopmost ? HWND_TOPMOST : HWND_NOT_TOPMOST, rect.X, rect.Y, rect.Width, rect.Height, SWP_SHOWWINDOW);
}
private string[] GetWindowTitles() {
List<string> WindowList = new List<string>();
Process[] ProcessArray = Process.GetProcesses();
foreach (Process p in ProcessArray) {
if (!IsNullOrWhitespace(p.MainWindowTitle)) {
WindowList.Add(p.MainWindowTitle);
}
}
return WindowList.ToArray();
}
public bool IsNullOrWhitespace(string Str) {
if (Str.Equals("null")) {
return true;
}
foreach (char c in Str) {
if (c != ' ') {
return false;
}
}
return true;
}
}
#endif


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 14回复贴,共1页
<<返回unity3d吧
分享到:
©2026 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示