mirror of
https://github.com/yuzu-emu/discord-rpc.git
synced 2024-12-23 04:15:39 +00:00
wip update unity example
This commit is contained in:
parent
0d24fabdf4
commit
82439911c6
2
examples/button-clicker/.gitignore
vendored
2
examples/button-clicker/.gitignore
vendored
|
@ -1,6 +1,8 @@
|
||||||
/Library/
|
/Library/
|
||||||
/Temp/
|
/Temp/
|
||||||
/obj/
|
/obj/
|
||||||
|
/Assets/Plugins/
|
||||||
|
/Assets/Plugins.meta
|
||||||
*.sln
|
*.sln
|
||||||
*.csproj
|
*.csproj
|
||||||
*.userprefs
|
*.userprefs
|
56
examples/button-clicker/Assets/BuildHelper.cs
Normal file
56
examples/button-clicker/Assets/BuildHelper.cs
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
using UnityEditor;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
[InitializeOnLoad]
|
||||||
|
public class ScriptBatch
|
||||||
|
{
|
||||||
|
static ScriptBatch()
|
||||||
|
{
|
||||||
|
EnsureDLL();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool FileExists(string filename)
|
||||||
|
{
|
||||||
|
return new FileInfo(filename).Exists;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void EnsureDLL()
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Make sure Discord dll exists");
|
||||||
|
|
||||||
|
string dstDll32 = "Assets/Plugins/x86/discord-rpc.dll";
|
||||||
|
string dstDll64 = "Assets/Plugins/x86_64/discord-rpc.dll";
|
||||||
|
|
||||||
|
if (!FileExists(dstDll32) || !FileExists(dstDll64))
|
||||||
|
{
|
||||||
|
string srcDll32 = "../../builds/install/win64-dynamic/bin/discord-rpc.dll";
|
||||||
|
string srcDll64 = "../../builds/install/win64-dynamic/bin/discord-rpc.dll";
|
||||||
|
|
||||||
|
if (!FileExists(srcDll32) || !FileExists(srcDll64))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Try to run build script");
|
||||||
|
Process proc = new Process();
|
||||||
|
proc.StartInfo.FileName = "python";
|
||||||
|
proc.StartInfo.Arguments = "build.py";
|
||||||
|
proc.StartInfo.WorkingDirectory = "../..";
|
||||||
|
proc.Start();
|
||||||
|
proc.WaitForExit();
|
||||||
|
if (proc.ExitCode != 0)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Build failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure the dirs exist
|
||||||
|
Directory.CreateDirectory("Assets/Plugins");
|
||||||
|
Directory.CreateDirectory("Assets/Plugins/x86");
|
||||||
|
Directory.CreateDirectory("Assets/Plugins/x86_64");
|
||||||
|
|
||||||
|
// Copy dlls
|
||||||
|
FileUtil.CopyFileOrDirectory("../../builds/install/win64-dynamic/bin/discord-rpc.dll", dstDll64);
|
||||||
|
FileUtil.CopyFileOrDirectory("../../builds/install/win32-dynamic/bin/discord-rpc.dll", dstDll32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
examples/button-clicker/Assets/BuildHelper.cs.meta
Normal file
13
examples/button-clicker/Assets/BuildHelper.cs.meta
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e5aecc4633e5f594b85eaa39f49bb402
|
||||||
|
timeCreated: 1512071254
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,9 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 4ddcc1759a3a2394fa1fa376963639e0
|
|
||||||
folderAsset: yes
|
|
||||||
timeCreated: 1501697278
|
|
||||||
licenseType: Free
|
|
||||||
DefaultImporter:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,27 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 2aadd6305b09fa94dab94261a8bb8caf
|
|
||||||
timeCreated: 1501697340
|
|
||||||
licenseType: Free
|
|
||||||
PluginImporter:
|
|
||||||
serializedVersion: 2
|
|
||||||
iconMap: {}
|
|
||||||
executionOrder: {}
|
|
||||||
isPreloaded: 0
|
|
||||||
isOverridable: 0
|
|
||||||
platformData:
|
|
||||||
data:
|
|
||||||
first:
|
|
||||||
Any:
|
|
||||||
second:
|
|
||||||
enabled: 1
|
|
||||||
settings: {}
|
|
||||||
data:
|
|
||||||
first:
|
|
||||||
Editor: Editor
|
|
||||||
second:
|
|
||||||
enabled: 0
|
|
||||||
settings:
|
|
||||||
DefaultValueInitialized: true
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -17,3 +17,4 @@ PhysicsManager:
|
||||||
m_EnablePCM: 1
|
m_EnablePCM: 1
|
||||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
m_AutoSimulation: 1
|
m_AutoSimulation: 1
|
||||||
|
m_AutoSyncTransforms: 1
|
||||||
|
|
|
@ -4,4 +4,7 @@
|
||||||
EditorBuildSettings:
|
EditorBuildSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes: []
|
m_Scenes:
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/main.unity
|
||||||
|
guid: 3b03d21bb25fa494e8694cd6e4b6d769
|
||||||
|
|
|
@ -24,6 +24,7 @@ Physics2DSettings:
|
||||||
m_QueriesStartInColliders: 1
|
m_QueriesStartInColliders: 1
|
||||||
m_ChangeStopsCallbacks: 0
|
m_ChangeStopsCallbacks: 0
|
||||||
m_CallbacksOnDisable: 1
|
m_CallbacksOnDisable: 1
|
||||||
|
m_AutoSyncTransforms: 1
|
||||||
m_AlwaysShowColliders: 0
|
m_AlwaysShowColliders: 0
|
||||||
m_ShowColliderSleep: 1
|
m_ShowColliderSleep: 1
|
||||||
m_ShowColliderContacts: 0
|
m_ShowColliderContacts: 0
|
||||||
|
|
|
@ -3,14 +3,15 @@
|
||||||
--- !u!129 &1
|
--- !u!129 &1
|
||||||
PlayerSettings:
|
PlayerSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 12
|
serializedVersion: 13
|
||||||
productGUID: 5eccc60d3e382a346a65f512d6b81b84
|
productGUID: 5eccc60d3e382a346a65f512d6b81b84
|
||||||
AndroidProfiler: 0
|
AndroidProfiler: 0
|
||||||
|
AndroidFilterTouchesWhenObscured: 0
|
||||||
defaultScreenOrientation: 4
|
defaultScreenOrientation: 4
|
||||||
targetDevice: 2
|
targetDevice: 2
|
||||||
useOnDemandResources: 0
|
useOnDemandResources: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: DefaultCompany
|
companyName: Discord Inc.
|
||||||
productName: button-clicker
|
productName: button-clicker
|
||||||
defaultCursor: {fileID: 0}
|
defaultCursor: {fileID: 0}
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
|
@ -38,8 +39,6 @@ PlayerSettings:
|
||||||
width: 1
|
width: 1
|
||||||
height: 1
|
height: 1
|
||||||
m_SplashScreenLogos: []
|
m_SplashScreenLogos: []
|
||||||
m_SplashScreenBackgroundLandscape: {fileID: 0}
|
|
||||||
m_SplashScreenBackgroundPortrait: {fileID: 0}
|
|
||||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||||
defaultScreenWidth: 1024
|
defaultScreenWidth: 1024
|
||||||
|
@ -49,7 +48,6 @@ PlayerSettings:
|
||||||
m_StereoRenderingPath: 0
|
m_StereoRenderingPath: 0
|
||||||
m_ActiveColorSpace: 0
|
m_ActiveColorSpace: 0
|
||||||
m_MTRendering: 1
|
m_MTRendering: 1
|
||||||
m_MobileMTRendering: 0
|
|
||||||
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
||||||
iosShowActivityIndicatorOnLoading: -1
|
iosShowActivityIndicatorOnLoading: -1
|
||||||
androidShowActivityIndicatorOnLoading: -1
|
androidShowActivityIndicatorOnLoading: -1
|
||||||
|
@ -64,8 +62,10 @@ PlayerSettings:
|
||||||
useOSAutorotation: 1
|
useOSAutorotation: 1
|
||||||
use32BitDisplayBuffer: 1
|
use32BitDisplayBuffer: 1
|
||||||
disableDepthAndStencilBuffers: 0
|
disableDepthAndStencilBuffers: 0
|
||||||
|
androidBlitType: 0
|
||||||
defaultIsFullScreen: 1
|
defaultIsFullScreen: 1
|
||||||
defaultIsNativeResolution: 1
|
defaultIsNativeResolution: 1
|
||||||
|
macRetinaSupport: 1
|
||||||
runInBackground: 0
|
runInBackground: 0
|
||||||
captureSingleScreen: 0
|
captureSingleScreen: 0
|
||||||
muteOtherAudioSources: 0
|
muteOtherAudioSources: 0
|
||||||
|
@ -95,6 +95,7 @@ PlayerSettings:
|
||||||
xboxEnableHeadOrientation: 0
|
xboxEnableHeadOrientation: 0
|
||||||
xboxEnableGuest: 0
|
xboxEnableGuest: 0
|
||||||
xboxEnablePIXSampling: 0
|
xboxEnablePIXSampling: 0
|
||||||
|
metalFramebufferOnly: 0
|
||||||
n3dsDisableStereoscopicView: 0
|
n3dsDisableStereoscopicView: 0
|
||||||
n3dsEnableSharedListOpt: 1
|
n3dsEnableSharedListOpt: 1
|
||||||
n3dsEnableVSync: 0
|
n3dsEnableVSync: 0
|
||||||
|
@ -103,6 +104,7 @@ PlayerSettings:
|
||||||
xboxOneMonoLoggingLevel: 0
|
xboxOneMonoLoggingLevel: 0
|
||||||
xboxOneLoggingLevel: 1
|
xboxOneLoggingLevel: 1
|
||||||
xboxOneDisableEsram: 0
|
xboxOneDisableEsram: 0
|
||||||
|
xboxOnePresentImmediateThreshold: 0
|
||||||
videoMemoryForVertexBuffers: 0
|
videoMemoryForVertexBuffers: 0
|
||||||
psp2PowerMode: 0
|
psp2PowerMode: 0
|
||||||
psp2AcquireBGM: 1
|
psp2AcquireBGM: 1
|
||||||
|
@ -134,12 +136,17 @@ PlayerSettings:
|
||||||
daydream:
|
daydream:
|
||||||
depthFormat: 0
|
depthFormat: 0
|
||||||
useSustainedPerformanceMode: 0
|
useSustainedPerformanceMode: 0
|
||||||
|
enableVideoLayer: 0
|
||||||
|
useProtectedVideoMemory: 0
|
||||||
hololens:
|
hololens:
|
||||||
depthFormat: 1
|
depthFormat: 1
|
||||||
protectGraphicsMemory: 0
|
protectGraphicsMemory: 0
|
||||||
useHDRDisplay: 0
|
useHDRDisplay: 0
|
||||||
|
m_ColorGamuts: 00000000
|
||||||
targetPixelDensity: 0
|
targetPixelDensity: 0
|
||||||
resolutionScalingMode: 0
|
resolutionScalingMode: 0
|
||||||
|
androidSupportedAspectRatio: 1
|
||||||
|
androidMaxAspectRatio: 2.1
|
||||||
applicationIdentifier: {}
|
applicationIdentifier: {}
|
||||||
buildNumber: {}
|
buildNumber: {}
|
||||||
AndroidBundleVersionCode: 1
|
AndroidBundleVersionCode: 1
|
||||||
|
@ -160,10 +167,10 @@ PlayerSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 238
|
m_Bits: 238
|
||||||
iPhoneSdkVersion: 988
|
iPhoneSdkVersion: 988
|
||||||
iOSTargetOSVersionString:
|
iOSTargetOSVersionString: 7.0
|
||||||
tvOSSdkVersion: 0
|
tvOSSdkVersion: 0
|
||||||
tvOSRequireExtendedGameController: 0
|
tvOSRequireExtendedGameController: 0
|
||||||
tvOSTargetOSVersionString:
|
tvOSTargetOSVersionString: 9.0
|
||||||
uIPrerenderedIcon: 0
|
uIPrerenderedIcon: 0
|
||||||
uIRequiresPersistentWiFi: 0
|
uIRequiresPersistentWiFi: 0
|
||||||
uIRequiresFullScreen: 1
|
uIRequiresFullScreen: 1
|
||||||
|
@ -220,7 +227,9 @@ PlayerSettings:
|
||||||
AndroidKeyaliasName:
|
AndroidKeyaliasName:
|
||||||
AndroidTVCompatibility: 1
|
AndroidTVCompatibility: 1
|
||||||
AndroidIsGame: 1
|
AndroidIsGame: 1
|
||||||
|
AndroidEnableTango: 0
|
||||||
androidEnableBanner: 1
|
androidEnableBanner: 1
|
||||||
|
androidUseLowAccuracyLocation: 0
|
||||||
m_AndroidBanners:
|
m_AndroidBanners:
|
||||||
- width: 320
|
- width: 320
|
||||||
height: 180
|
height: 180
|
||||||
|
@ -231,10 +240,14 @@ PlayerSettings:
|
||||||
m_BuildTargetBatching: []
|
m_BuildTargetBatching: []
|
||||||
m_BuildTargetGraphicsAPIs: []
|
m_BuildTargetGraphicsAPIs: []
|
||||||
m_BuildTargetVRSettings: []
|
m_BuildTargetVRSettings: []
|
||||||
|
m_BuildTargetEnableVuforiaSettings: []
|
||||||
openGLRequireES31: 0
|
openGLRequireES31: 0
|
||||||
openGLRequireES31AEP: 0
|
openGLRequireES31AEP: 0
|
||||||
webPlayerTemplate: APPLICATION:Default
|
|
||||||
m_TemplateCustomTags: {}
|
m_TemplateCustomTags: {}
|
||||||
|
mobileMTRendering:
|
||||||
|
Android: 1
|
||||||
|
iPhone: 1
|
||||||
|
tvOS: 1
|
||||||
wiiUTitleID: 0005000011000000
|
wiiUTitleID: 0005000011000000
|
||||||
wiiUGroupID: 00010000
|
wiiUGroupID: 00010000
|
||||||
wiiUCommonSaveSize: 4096
|
wiiUCommonSaveSize: 4096
|
||||||
|
@ -368,6 +381,9 @@ PlayerSettings:
|
||||||
switchUdpSendBufferSize: 9
|
switchUdpSendBufferSize: 9
|
||||||
switchUdpReceiveBufferSize: 42
|
switchUdpReceiveBufferSize: 42
|
||||||
switchSocketBufferEfficiency: 4
|
switchSocketBufferEfficiency: 4
|
||||||
|
switchSocketInitializeEnabled: 1
|
||||||
|
switchNetworkInterfaceManagerInitializeEnabled: 1
|
||||||
|
switchPlayerConnectionEnabled: 1
|
||||||
ps4NPAgeRating: 12
|
ps4NPAgeRating: 12
|
||||||
ps4NPTitleSecret:
|
ps4NPTitleSecret:
|
||||||
ps4NPTrophyPackPath:
|
ps4NPTrophyPackPath:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
m_EditorVersion: 2017.1.1f1
|
m_EditorVersion: 2017.2.0f3
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue