ภาพรวม
โอเวอร์เลย์ Steam เป็นอินเตอร์เฟซสำหรับผู้ใช้ของ Steam ชนิดหนึ่งที่สามารถเรียกให้แสดงเหนือเกมเกือบทุกเกมที่เปิดทำงานผ่าน Steam โอเวอร์เลย์ทำให้ผู้ใช้สามารถเข้าถึงรายชื่อเพื่อน, เว็บเบราว์เซอร์, แชต และการซื้อเนื้อหาดาวน์โหลดภายในเกม
ผู้ใช้สามารถเข้าถึงโอเวอร์เลย์ได้โดยกดปุ่มลัดเริ่มต้น SHIFT+TAB แต่สามารถเปลี่ยนปุ่มได้จากไดอะล็อก Steam->Settings
ข้อกำหนด
เกมของคุณไม่จำเป็นต้องทำอะไรเป็นพิเศษเพื่อใช้โอเวอร์เลย์ เนื่องจากระบบนี้จะฮุคกับเกมทุกเกมที่เรียกใช้งานจาก Steam อยู่แล้ว! ขณะพัฒนาเกมหรือเรียกใช้เกมของคุณในเครื่องมือดีบัก คุณสามารถโหลดโอเวอร์เลย์ได้โดยการเรียก
SteamAPI_Init ดังนั้น คุณจึงจำเป็นต้องเรียก
SteamAPI_Init ก่อนเริ่มต้นอุปกรณ์ OpenGL/D3D มิฉะนั้นจะไม่สามารถฮุคกับการสร้างอุปกรณ์ได้
โอเวอร์เลย์รองรับเกมที่ใช้ DirectX 7 - 12, OpenGL, Metal และ Vulkan นอกจากนี้ โอเวอร์เลย์จะไม่ทำงานในเกมที่มีการ Rasterize ด้วยซอฟต์แวร์
macOS: Overlay support for 10.15 (Catalina) requires adding entitlements to your build configuration. Details are provided on the
platforms page.
หมายเหตุ: โอเวอร์เลย์จะถูกปิดการใช้งานโดยอัตโนมัติในแอปประเภท 'ซอฟต์แวร์' หากคุณจำเป็นต้องเปิดการใช้งานโอเวอร์เลย์ คุณสามารถทำได้โดย:
- ตรวจสอบให้แน่ใจว่าบัญชี Steam ของคุณมีสิทธิ์ที่จะแก้ไขเมทาเดตาของแอป
- ออกจากหน้ารองรับของแอปไปยัง > แก้ไขการตั้งค่า Steamworks > แท็บการติดตั้ง > การติดตั้งทั่วไป
- เลือกกล่องเปิดการใช้งานโอเวอร์เลย์ Steam สำหรับแอปพลิเคชัน
- เผยแพร่
การเปิดใช้งานโอเวอร์เลย์จากแอปของคุณ
There are a set of functions in the Steamworks API that give you direct access to triggering the game overlay.
การสื่อสารจากโอเวอร์เลย์ถึงเกมของคุณ
The following signals (callbacks) are sent from Steam to your game, based on user action in the overlay:
- GameOverlayActivated_t
โพสต์เมื่อมีการเปิดใช้งานหรือปิดใช้งานโอเวอร์เลย์ของเกม เกมสามารถใช้ฟังก์ชันนี้เพื่อหยุดเกมแบบมีผู้เล่นคนเดียวไว้ชั่วคราว หรือเล่นต่อจากที่หยุดไว้ได้
- GameServerChangeRequested_t
โพสต์เมื่อผู้ใช้เลือกเกมของเพื่อนที่ตนต้องการเข้าร่วม ซึ่งมีรายละเอียดเกี่ยวกับเซิร์ฟเวอร์เกมที่จะเข้าร่วม
- GameLobbyJoinRequested_t
โพสต์เมื่อผู้ใช้เลือกเกมของเพื่อนที่ตนต้องการเข้าร่วม ซึ่งมีรายละเอียดเกี่ยวกับล็อบบี้ที่จะเข้าร่วม
คำถามที่พบบ่อย
หมายเหตุ: You may find additional answers on the customer facing support site such as this topic:
Steam Community Overlay does not Activate.
ถาม: ทำไมโอเวอร์เลย์ของ Steam ทำให้แอปของฉันหยุดทำงาน?
ตอบ: The Steam overlay is used in thousands of games and as such it has been very thoroughly tested and is rarely the cause of a crash. However, because of the way it injects itself into the game, it does often expose memory leaks or memory corruption in the usage of your rendering API that may not have impacted game play.
To diagnose overlay crashes with DirectX for example, try to determine how D3D got into a bad state by using the d3d debug runtime with all (info/warning/error/notice) level spew turned on. It might give some hints to orphaned d3d resources. If you don’t find anything that way there may be a more general memory corruption issue. If these always occur on shutdown then it’s likely a shutdown ordering issue with the game not cleaning up as it shuts down.
If after debugging the app is still crashing in the overlay, please notify us in the
Steamworks Development Group.
ถาม: ทำไมโอเวอร์เลย์ Steam ถึงไม่แสดงขึ้นในแอปของฉัน?
ตอบ: First ensure that you meet the
ข้อกำหนด above. If you do meet the requirements and it's still not showing up, make sure you're launching the app through the Steam client, either directly from the lobby/quick launch list, or by calling
SteamAPI_RestartAppIfNecessary.
Q. เกมของฉันใช้ D12onWin7 และโอเวอร์เลย์ Steam ไม่ทำงาน ทำไมจึงเป็นเช่นนั้น?
ตอบ: Please refer to this
Microsoft document on how to add Steam overlay support.