mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-26 13:38:06 +03:00
Easier unity config
This commit is contained in:
parent
b7564630cd
commit
d7808bf424
@ -7,6 +7,27 @@ namespace Facepunch.Steamworks
|
|||||||
{
|
{
|
||||||
public static class Config
|
public static class Config
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Should be called before creating any interfaces, to configure Steam for Unity.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="platform">Please pass in Application.platform.ToString()</param>
|
||||||
|
public static void ForUnity( string platform )
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Windows Config
|
||||||
|
//
|
||||||
|
if ( platform == "WindowsEditor" || platform == "Windows" )
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// 32bit windows unity uses a stdcall
|
||||||
|
//
|
||||||
|
if ( IntPtr.Size == 4 ) UseThisCall = false;
|
||||||
|
|
||||||
|
ForcePlatform( OperatingSystem.Windows, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Some platforms allow/need CallingConvention.ThisCall. If you're crashing with argument null
|
/// Some platforms allow/need CallingConvention.ThisCall. If you're crashing with argument null
|
||||||
/// errors on certain platforms, try flipping this to true.
|
/// errors on certain platforms, try flipping this to true.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user