├── .gitignore ├── unity ├── Assets │ ├── Scenes │ │ ├── Login.meta │ │ ├── Ranking.meta │ │ ├── CloudSave.meta │ │ ├── LoginReward.meta │ │ ├── TakeOver.meta │ │ ├── Login │ │ │ ├── README.md.meta │ │ │ ├── LoginAsync.cs.meta │ │ │ ├── LoginFuture.cs.meta │ │ │ ├── template.yaml.meta │ │ │ ├── template.yaml │ │ │ ├── Login.unity.meta │ │ │ ├── README.md │ │ │ ├── LoginAsync.cs │ │ │ ├── LoginFuture.cs │ │ │ └── Login.unity │ │ ├── Ranking │ │ │ ├── README.md.meta │ │ │ ├── template.yaml.meta │ │ │ ├── RankingAsync.cs.meta │ │ │ ├── RankingFuture.cs.meta │ │ │ ├── Ranking.unity.meta │ │ │ ├── README.md │ │ │ ├── template.yaml │ │ │ ├── RankingAsync.cs │ │ │ ├── RankingFuture.cs │ │ │ └── Ranking.unity │ │ ├── CloudSave │ │ │ ├── README.md.meta │ │ │ ├── CloudSaveAsync.cs.meta │ │ │ ├── template.yaml.meta │ │ │ ├── CloudSaveFuture.cs.meta │ │ │ ├── CloudSave.unity.meta │ │ │ ├── template.yaml │ │ │ ├── README.md │ │ │ ├── CloudSaveAsync.cs │ │ │ ├── CloudSaveFuture.cs │ │ │ └── CloudSave.unity │ │ ├── InGameCurrencyStore.meta │ │ ├── LoginReward │ │ │ ├── README.md.meta │ │ │ ├── template.yaml.meta │ │ │ ├── LoginRewardAsync.cs.meta │ │ │ ├── LoginRewardFuture.cs.meta │ │ │ ├── LoginReward.unity.meta │ │ │ ├── README.md │ │ │ ├── template.yaml │ │ │ ├── LoginRewardAsync.cs │ │ │ ├── LoginRewardFuture.cs │ │ │ └── LoginReward.unity │ │ ├── Lottery │ │ │ ├── template.yaml.meta │ │ │ ├── LotteryAsync.cs.meta │ │ │ ├── LotteryFuture.cs.meta │ │ │ ├── README.md.meta │ │ │ ├── Lottery.unity.meta │ │ │ ├── README.md │ │ │ ├── LotteryAsync.cs │ │ │ ├── template.yaml │ │ │ ├── LotteryFuture.cs │ │ │ └── Lottery.unity │ │ ├── TakeOver │ │ │ ├── README.md.meta │ │ │ ├── template.yaml.meta │ │ │ ├── TakeOverAsync.cs.meta │ │ │ ├── TakeOverFuture.cs.meta │ │ │ ├── template.yaml │ │ │ ├── TakeOver.unity.meta │ │ │ ├── README.md │ │ │ ├── TakeOverAsync.cs │ │ │ ├── TakeOverFuture.cs │ │ │ └── TakeOver.unity │ │ ├── Gs2.Unity.Sample.asmdef.meta │ │ ├── InGameCurrencyStore │ │ │ ├── README.md.meta │ │ │ ├── template.yaml.meta │ │ │ ├── InGameCurrencyStoreAsync.cs.meta │ │ │ ├── InGameCurrencyStoreFuture.cs.meta │ │ │ ├── InGameCurrencyStore.unity.meta │ │ │ ├── README.md │ │ │ ├── template.yaml │ │ │ ├── InGameCurrencyStoreAsync.cs │ │ │ ├── InGameCurrencyStoreFuture.cs │ │ │ └── InGameCurrencyStore.unity │ │ └── Gs2.Unity.Sample.asmdef │ └── Scenes.meta ├── ProjectSettings │ ├── ProjectVersion.txt │ ├── Packages │ │ └── com.unity.testtools.codecoverage │ │ │ └── Settings.json │ ├── ClusterInputManager.asset │ ├── PresetManager.asset │ ├── EditorBuildSettings.asset │ ├── XRSettings.asset │ ├── VersionControlSettings.asset │ ├── TimeManager.asset │ ├── VFXManager.asset │ ├── AudioManager.asset │ ├── TagManager.asset │ ├── EditorSettings.asset │ ├── UnityConnectSettings.asset │ ├── DynamicsManager.asset │ ├── MemorySettings.asset │ ├── PackageManagerSettings.asset │ ├── NavMeshAreas.asset │ ├── Physics2DSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ └── QualitySettings.asset ├── README.md ├── .gitignore └── Packages │ └── manifest.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db9b72821bd84143b4a4b3672880c702 3 | timeCreated: 1701266204 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ff2307fe8ad4cfb97f131655592b326 3 | timeCreated: 1701354210 -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1a705cbbcba41e4906761fd9cdf6873 3 | timeCreated: 1701347005 -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63626604fa444a9ea1ff2aaa18b85c1e 3 | timeCreated: 1701318937 -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a92c9fbdfec54522a86009cc0c3790c5 3 | timeCreated: 1701345339 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Game Server Services Samples 2 | 3 | Game Server Services (https://gs2.io) のサンプルコードです。 4 | 5 | - [for Unity](unity/) -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0bb62b556cb4e529b3352b7bfbccee3 3 | timeCreated: 1701349856 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 308f103ab7f54d46a667b8c2f44507a0 3 | timeCreated: 1701356841 -------------------------------------------------------------------------------- /unity/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.3.3f1 2 | m_EditorVersionWithRevision: 2022.3.3f1 (7cdc2969a641) 3 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecff298a03e5442eb2ca179adac87772 3 | timeCreated: 1701349654 -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 801cfae939ef40cf9b49d911b38884a5 3 | timeCreated: 1701282447 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/LoginAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4fe2f54136f48bb8b0e6ab546a109c5 3 | timeCreated: 1701268042 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/LoginFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33000a68017a4eca99e5d86fc928a619 3 | timeCreated: 1701266237 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b39ea2fb66ac45cc9e615b5d96e78114 3 | timeCreated: 1701268298 -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7717cc2f9fd74a138a11355846a1cd01 3 | timeCreated: 1701349890 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6104f24edfe84ece929af554ba606a50 3 | timeCreated: 1701929830 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67ca1b6510a343909feae108b37e27ee 3 | timeCreated: 1701354234 -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f57f5c6a0571474993ece7185cd0ea34 3 | timeCreated: 1701349950 -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6853403a18f44a57b96aac280d81e849 3 | timeCreated: 1701345541 -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/CloudSaveAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 161e9bb694c64ffaa54664e9f51f4f45 3 | timeCreated: 1701347034 -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28bf0dadd8504a7cb80f556e4a744bc8 3 | timeCreated: 1701347007 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Gs2.Unity.Sample.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42a3ab00bb314880bccc9b1e98251924 3 | timeCreated: 1701266209 -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc3e34e0424d4218bd0305cfb672770e 3 | timeCreated: 1701318946 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/LotteryAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 408781afc8364e73be00137fa886ec5d 3 | timeCreated: 1701930617 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/LotteryFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2be2ced19d2440d9b030dac19d273bc8 3 | timeCreated: 1701932149 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/RankingAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 319a02d24647408fb3416a45206a63c1 3 | timeCreated: 1701354219 -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/RankingFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a5832ed78484e94a44d21d1c3c6cd2a 3 | timeCreated: 1701356533 -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/TakeOverAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05b8ff2f1af64071853e654536dd7897 3 | timeCreated: 1701345343 -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/TakeOverFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e18d3a469324d7db1613c597f17c635 3 | timeCreated: 1701346624 -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/CloudSaveFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1f5011a53b440e1904e0884fa61d311 3 | timeCreated: 1701348232 -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e50368aca9f4286b619c3c056dc9f56 3 | timeCreated: 1701349817 -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/LoginRewardAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 660cf755ebbb4a06a4441dab1437bde9 3 | timeCreated: 1701319662 -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/LoginRewardFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 818b18f88da94dcebed5fd5c39e7b33d 3 | timeCreated: 1701344856 -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/template.yaml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64b494ac47c4498792701baf1393fd41 3 | timeCreated: 1701282455 -------------------------------------------------------------------------------- /unity/ProjectSettings/Packages/com.unity.testtools.codecoverage/Settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "m_Dictionary": { 3 | "m_DictionaryValues": [] 4 | } 5 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/InGameCurrencyStoreAsync.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30a38839384a49309e48ff9716422fc3 3 | timeCreated: 1701310933 -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/InGameCurrencyStoreFuture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d29a056460fa497a98978618ebe31c02 3 | timeCreated: 1701312379 -------------------------------------------------------------------------------- /unity/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Resources: 4 | AccountNamespace: 5 | Type: GS2::Account::Namespace 6 | Properties: 7 | Name: Login -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Resources: 4 | AccountNamespace: 5 | Type: GS2::Account::Namespace 6 | Properties: 7 | Name: TakeOver -------------------------------------------------------------------------------- /unity/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ae437f9369894aa6a13e6c9e3ca9b1c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/Login.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7203e5c32d6e749df9a8635b4243546f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1d386585d5ea474aa8c00b21c0cc4c1 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/CloudSave.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe6e87e59208a499493c6f21b96140d3 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/Lottery.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9dfaae233c265461090138ec2ff847a0 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/Ranking.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 029ffc8f1e2844f5aa33717eaf0f4bb5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/TakeOver.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ac7b4f97fe7545aba872633fcd58d90 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/LoginReward.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea83fd8688e2747d58fdf3fb682b9076 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /unity/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/InGameCurrencyStore.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eec4d192bb05444269106b9535ef219b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /unity/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /unity/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/README.md: -------------------------------------------------------------------------------- 1 | # ログイン 2 | 3 | GS2-Account を使用してログイン処理を実装します。 4 | 5 | ## セットアップ方法 6 | 7 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 8 | 9 | Login.unity を Unity Editor で開きます。 10 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 11 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/README.md: -------------------------------------------------------------------------------- 1 | # ガチャ 2 | 3 | GS2-Lottery を使用してガチャ機能を実現します。 4 | 5 | ## セットアップ方法 6 | 7 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 8 | 9 | Lottery.unity を Unity Editor で開きます。 10 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 11 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/README.md: -------------------------------------------------------------------------------- 1 | # ランキング 2 | 3 | GS2-Ranking を使用してスコアランキング機能を実現します。 4 | 5 | ## セットアップ方法 6 | 7 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 8 | 9 | Ranking.unity を Unity Editor で開きます。 10 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 11 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Resources: 4 | AccountNamespace: 5 | Type: GS2::Account::Namespace 6 | Properties: 7 | Name: CloudSave-Account 8 | 9 | DatastoreNamespace: 10 | Type: GS2::Datastore::Namespace 11 | Properties: 12 | Name: CloudSave-Datastore -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/README.md: -------------------------------------------------------------------------------- 1 | # アカウント引き継ぎ 2 | 3 | GS2-Account で使用できるアカウントを引き継ぎできるようにします。 4 | 5 | ## セットアップ方法 6 | 7 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 8 | 9 | Login.unity を Unity Editor で開きます。 10 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 11 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/README.md: -------------------------------------------------------------------------------- 1 | # クラウドセーブ 2 | 3 | バイナリ列を GS2-Datastore にアップロードし、後ほどダウンロードできるようにします。 4 | 5 | ## セットアップ方法 6 | 7 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 8 | 9 | CloudSave.unity を Unity Editor で開きます。 10 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 11 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/README.md: -------------------------------------------------------------------------------- 1 | # ゲーム内通貨の販売 2 | 3 | GS2-Showcase を使用して、GS2-Money で管理する課金通貨を購入できるようにします。 4 | 5 | ## セットアップ方法 6 | 7 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 8 | 9 | InGameCurrencyStore.unity を Unity Editor で開きます。 10 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 11 | -------------------------------------------------------------------------------- /unity/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/README.md: -------------------------------------------------------------------------------- 1 | # ログインボーナス 2 | 3 | GS2-LoginReward を使用してログインボーナス処理を実装します。 4 | このサンプルでは7日でループし、毎日100の無償通貨を入手できますが、7日目だけ300の無償通貨が手に入るように設定されています。 5 | 6 | ## セットアップ方法 7 | 8 | [GS2-Deploy テンプレート](template.yaml) を GS2-Deploy にアップロードし、リソースをセットアップします。 9 | 10 | Login.unity を Unity Editor で開きます。 11 | シーン内に配置された「GameObject」に割り当てられた「ClientId」「ClientSecret」に自身のプロジェクトのクライアントIDとクライアントシークレットを設定します。 12 | -------------------------------------------------------------------------------- /unity/README.md: -------------------------------------------------------------------------------- 1 | # GS2 Samples for Unity 2 | 3 | Game Server Services (https://gs2.io) の Unity におけるサンプルコードです。 4 | 5 | - [ログイン](Assets/Scenes/Login) 6 | - [アカウント引き継ぎ](Assets/Scenes/TakeOver) 7 | - [クラウドセーブ](Assets/Scenes/CloudSave) 8 | - [ランキング](Assets/Scenes/Ranking) 9 | - [ガチャ](Assets/Scenes/Lottery) 10 | - [ログインボーナス](Assets/Scenes/LoginReward) 11 | - [ゲーム内通貨の販売](Assets/Scenes/InGameCurrencyStore) 12 | 13 | ## 動作環境 14 | 15 | Unity 2022 LTS 以降 16 | 17 | -------------------------------------------------------------------------------- /unity/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /unity/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Globals: 4 | Alias: 5 | AccountNamespaceName: Ranking-Account 6 | RankingNamespaceName: Ranking 7 | RankingCategoryName: Category 8 | 9 | Resources: 10 | AccountNamespace: 11 | Type: GS2::Account::Namespace 12 | Properties: 13 | Name: ${AccountNamespaceName} 14 | 15 | RankingNamespace: 16 | Type: GS2::Ranking::Namespace 17 | Properties: 18 | Name: ${RankingNamespaceName} 19 | 20 | RankingMasterData: 21 | Type: GS2::Ranking::CurrentRankingMaster 22 | Properties: 23 | NamespaceName: ${RankingNamespaceName} 24 | Settings: 25 | version: "2019-09-17" 26 | categories: 27 | - name: ${RankingCategoryName} 28 | orderDirection: desc 29 | scope: global 30 | calculateIntervalMinutes: 60 31 | uniqueByUserId: true 32 | DependsOn: 33 | - RankingNamespace -------------------------------------------------------------------------------- /unity/Assets/Scenes/Gs2.Unity.Sample.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gs2.Unity.Sample.Simple", 3 | "rootNamespace": "", 4 | "references": [ 5 | "Gs2", 6 | "Gs2.Unity", 7 | "Gs2.Unity.UIKit", 8 | "UniTask", 9 | "UniTask.Linq", 10 | "Unity.Services.Core", 11 | "UnityEngine.Purchasing", 12 | "UnityEngine.Purchasing.Stores" 13 | ], 14 | "includePlatforms": [], 15 | "excludePlatforms": [], 16 | "allowUnsafeCode": false, 17 | "overrideReferences": false, 18 | "precompiledReferences": [], 19 | "autoReferenced": true, 20 | "defineConstraints": [], 21 | "versionDefines": [ 22 | { 23 | "name": "com.unity.purchasing", 24 | "expression": "", 25 | "define": "GS2_ENABLE_PURCHASING" 26 | }, 27 | { 28 | "name": "com.cysharp.unitask", 29 | "expression": "", 30 | "define": "GS2_ENABLE_UNITASK" 31 | } 32 | ], 33 | "noEngineReferences": false 34 | } -------------------------------------------------------------------------------- /unity/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | -------------------------------------------------------------------------------- /unity/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /unity/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /unity/ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /unity/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_AdvancedSettingsExpanded: 1 17 | m_ScopedRegistriesSettingsExpanded: 1 18 | m_SeeAllPackageVersions: 0 19 | m_DismissPreviewPackagesInUse: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_ConfigSource: 0 29 | - m_Id: scoped:project:Game Server Services 30 | m_Name: Game Server Services 31 | m_Url: https://upm.gs2.io/npm 32 | m_Scopes: 33 | - io.gs2 34 | m_IsDefault: 0 35 | m_Capabilities: 0 36 | m_ConfigSource: 4 37 | m_UserSelectedRegistryName: Game Server Services 38 | m_UserAddingNewScopedRegistry: 0 39 | m_RegistryInfoDraft: 40 | m_Modified: 0 41 | m_ErrorMessage: 42 | m_UserModificationsInstanceId: -834 43 | m_OriginalInstanceId: -836 44 | m_LoadAssets: 0 45 | -------------------------------------------------------------------------------- /unity/.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Asset meta data should only be ignored when the corresponding asset is also ignored 18 | !/[Aa]ssets/**/*.meta 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | 63 | # Crashlytics generated file 64 | crashlytics-build.properties 65 | 66 | # Packed Addressables 67 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 68 | 69 | # Temporary auto-generated Android Assets 70 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 71 | /[Aa]ssets/[Ss]treamingAssets/aa/* 72 | 73 | .idea 74 | .DS_Store -------------------------------------------------------------------------------- /unity/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /unity/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", 4 | "io.gs2.csharp.sdk": "2023.11.14", 5 | "io.gs2.unity.sdk": "2023.11.7", 6 | "com.unity.collab-proxy": "2.0.5", 7 | "com.unity.feature.development": "1.0.1", 8 | "com.unity.textmeshpro": "3.0.6", 9 | "com.unity.timeline": "1.7.4", 10 | "com.unity.ugui": "1.0.0", 11 | "com.unity.visualscripting": "1.8.0", 12 | "com.unity.modules.ai": "1.0.0", 13 | "com.unity.modules.androidjni": "1.0.0", 14 | "com.unity.modules.animation": "1.0.0", 15 | "com.unity.modules.assetbundle": "1.0.0", 16 | "com.unity.modules.audio": "1.0.0", 17 | "com.unity.modules.cloth": "1.0.0", 18 | "com.unity.modules.director": "1.0.0", 19 | "com.unity.modules.imageconversion": "1.0.0", 20 | "com.unity.modules.imgui": "1.0.0", 21 | "com.unity.modules.jsonserialize": "1.0.0", 22 | "com.unity.modules.particlesystem": "1.0.0", 23 | "com.unity.modules.physics": "1.0.0", 24 | "com.unity.modules.physics2d": "1.0.0", 25 | "com.unity.modules.screencapture": "1.0.0", 26 | "com.unity.modules.terrain": "1.0.0", 27 | "com.unity.modules.terrainphysics": "1.0.0", 28 | "com.unity.modules.tilemap": "1.0.0", 29 | "com.unity.modules.ui": "1.0.0", 30 | "com.unity.modules.uielements": "1.0.0", 31 | "com.unity.modules.umbra": "1.0.0", 32 | "com.unity.modules.unityanalytics": "1.0.0", 33 | "com.unity.modules.unitywebrequest": "1.0.0", 34 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 35 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 36 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 37 | "com.unity.modules.unitywebrequestwww": "1.0.0", 38 | "com.unity.modules.vehicles": "1.0.0", 39 | "com.unity.modules.video": "1.0.0", 40 | "com.unity.modules.vr": "1.0.0", 41 | "com.unity.modules.wind": "1.0.0", 42 | "com.unity.modules.xr": "1.0.0" 43 | }, 44 | "scopedRegistries": [ 45 | { 46 | "name": "Game Server Services", 47 | "url": "https://upm.gs2.io/npm", 48 | "scopes": [ 49 | "io.gs2" 50 | ] 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /unity/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /unity/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/LoginAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using Cysharp.Threading.Tasks.Linq; 19 | using Gs2.Core.Model; 20 | using Gs2.Unity.Core; 21 | using Gs2.Unity.Util; 22 | using UnityEngine; 23 | using Cysharp.Threading.Tasks; 24 | 25 | namespace Gs2.Sample.Simple 26 | { 27 | public class LoginAsync : MonoBehaviour 28 | { 29 | public string clientId; 30 | public string clientSecret; 31 | 32 | public string accountNamespaceName; 33 | 34 | private async UniTask ProcessAsync() { 35 | // Initialize GS2 SDK 36 | var gs2 = await Gs2Client.CreateAsync( 37 | new BasicGs2Credential( 38 | clientId, 39 | clientSecret 40 | ), 41 | Region.ApNortheast1 42 | ); 43 | 44 | // define GS2-Account namespace 45 | var gs2Account = gs2.Account.Namespace( 46 | this.accountNamespaceName 47 | ); 48 | 49 | // Create an anonymous account 50 | var account = await ( 51 | await gs2Account.CreateAsync() 52 | ).ModelAsync(); 53 | 54 | // login 55 | var gameSession = await gs2.LoginAsync( 56 | new Gs2AccountAuthenticator( 57 | accountSetting: new AccountSetting { 58 | accountNamespaceName = this.accountNamespaceName, 59 | } 60 | ), 61 | account.UserId, 62 | account.Password 63 | ); 64 | 65 | // list takeover settings 66 | var takeOvers = await gs2Account.Me( 67 | gameSession 68 | ).TakeOversAsync().ToListAsync(); 69 | foreach (var takeOver in takeOvers) { 70 | Debug.Log(takeOver.UserId); 71 | Debug.Log(takeOver.Type); 72 | Debug.Log(takeOver.UserIdentifier); 73 | } 74 | } 75 | 76 | public void Start() { 77 | StartCoroutine(ProcessAsync().ToCoroutine()); 78 | } 79 | } 80 | } 81 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/CloudSaveAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using System.Collections.Generic; 19 | using System.Text; 20 | using Cysharp.Threading.Tasks.Linq; 21 | using Gs2.Core.Model; 22 | using Gs2.Unity.Core; 23 | using Gs2.Unity.Util; 24 | using UnityEngine; 25 | using Cysharp.Threading.Tasks; 26 | using UnityEditor; 27 | 28 | namespace Gs2.Sample.Simple 29 | { 30 | public class CloudSaveAsync : MonoBehaviour 31 | { 32 | public string clientId; 33 | public string clientSecret; 34 | 35 | public string accountNamespaceName; 36 | public string datastoreNamespaceName; 37 | 38 | private async UniTask ProcessAsync() { 39 | // Initialize GS2 SDK 40 | var gs2 = await Gs2Client.CreateAsync( 41 | new BasicGs2Credential( 42 | clientId, 43 | clientSecret 44 | ), 45 | Region.ApNortheast1 46 | ); 47 | 48 | // define GS2-Account namespace 49 | var gs2Account = gs2.Account.Namespace( 50 | this.accountNamespaceName 51 | ); 52 | 53 | // Create an anonymous account 54 | var account = await ( 55 | await gs2Account.CreateAsync() 56 | ).ModelAsync(); 57 | 58 | // login 59 | var gameSession = await gs2.LoginAsync( 60 | new Gs2AccountAuthenticator( 61 | accountSetting: new AccountSetting { 62 | accountNamespaceName = this.accountNamespaceName, 63 | } 64 | ), 65 | account.UserId, 66 | account.Password 67 | ); 68 | 69 | // define GS2-Datastore namespace 70 | var gs2Datastore = gs2.Datastore.Namespace( 71 | this.datastoreNamespaceName 72 | ); 73 | 74 | // define save data 75 | var saveData = new byte[] { 76 | (byte) 'A', (byte) 'B', (byte) 'C' 77 | }; 78 | 79 | // upload save data 80 | await gs2Datastore.Me( 81 | gameSession 82 | ).UploadAsync( 83 | "public", 84 | new List(), 85 | saveData, 86 | "PublicData" 87 | ); 88 | 89 | // download save data 90 | var downloadedSaveData = await gs2Datastore.Me( 91 | gameSession 92 | ).DataObject( 93 | "PublicData" 94 | ).DownloadAsync(); 95 | 96 | Debug.Log(Encoding.ASCII.GetString(downloadedSaveData)); 97 | } 98 | 99 | public void Start() { 100 | StartCoroutine(ProcessAsync().ToCoroutine()); 101 | } 102 | } 103 | } 104 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Globals: 4 | Alias: 5 | AccountNamespaceName: LoginReward-Account 6 | MoneyNamespaceName: LoginReward-Money 7 | LoginRewardNamespaceName: LoginReward 8 | LoginRewardBonusName: Reward 9 | 10 | Resources: 11 | AccountNamespace: 12 | Type: GS2::Account::Namespace 13 | Properties: 14 | Name: ${AccountNamespaceName} 15 | 16 | MoneyNamespace: 17 | Type: GS2::Money::Namespace 18 | Properties: 19 | Name: ${MoneyNamespaceName} 20 | Priority: free 21 | ShareFree: true 22 | Currency: JPY 23 | EnableFakeReceipt: true 24 | 25 | LoginRewardNamespace: 26 | Type: GS2::LoginReward::Namespace 27 | Properties: 28 | Name: ${LoginRewardNamespaceName} 29 | TransactionSetting: 30 | EnableAutoRun: true 31 | 32 | LoginRewardMasterData: 33 | Type: GS2::LoginReward::CurrentBonusMaster 34 | Properties: 35 | NamespaceName: ${LoginRewardNamespaceName} 36 | Settings: 37 | version: "2023-07-11" 38 | bonusModels: 39 | - name: ${LoginRewardBonusName} 40 | mode: streaming 41 | resetHour: 15 42 | repeat: enabled 43 | rewards: 44 | - acquireActions: 45 | - action: Gs2Money:DepositByUserId 46 | request: 47 | namespaceName: ${MoneyNamespaceName} 48 | userId: "#{userId}" 49 | slot: 0 50 | price: 0 51 | count: 100 52 | - acquireActions: 53 | - action: Gs2Money:DepositByUserId 54 | request: 55 | namespaceName: ${MoneyNamespaceName} 56 | userId: "#{userId}" 57 | slot: 0 58 | price: 0 59 | count: 100 60 | - acquireActions: 61 | - action: Gs2Money:DepositByUserId 62 | request: 63 | namespaceName: ${MoneyNamespaceName} 64 | userId: "#{userId}" 65 | slot: 0 66 | price: 0 67 | count: 100 68 | - acquireActions: 69 | - action: Gs2Money:DepositByUserId 70 | request: 71 | namespaceName: ${MoneyNamespaceName} 72 | userId: "#{userId}" 73 | slot: 0 74 | price: 0 75 | count: 100 76 | - acquireActions: 77 | - action: Gs2Money:DepositByUserId 78 | request: 79 | namespaceName: ${MoneyNamespaceName} 80 | userId: "#{userId}" 81 | slot: 0 82 | price: 0 83 | count: 100 84 | - acquireActions: 85 | - action: Gs2Money:DepositByUserId 86 | request: 87 | namespaceName: ${MoneyNamespaceName} 88 | userId: "#{userId}" 89 | slot: 0 90 | price: 0 91 | count: 100 92 | - acquireActions: 93 | - action: Gs2Money:DepositByUserId 94 | request: 95 | namespaceName: ${MoneyNamespaceName} 96 | userId: "#{userId}" 97 | slot: 0 98 | price: 0 99 | count: 300 100 | missedReceiveRelief: disabled 101 | DependsOn: 102 | - LoginRewardNamespace 103 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/LoginFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System.Collections; 18 | using Gs2.Core.Model; 19 | using Gs2.Unity.Core; 20 | using Gs2.Unity.Gs2Account.Model; 21 | using Gs2.Unity.Util; 22 | using UnityEngine; 23 | 24 | namespace Gs2.Sample.Simple 25 | { 26 | public class LoginFuture : MonoBehaviour 27 | { 28 | public string clientId; 29 | public string clientSecret; 30 | 31 | public string accountNamespaceName; 32 | 33 | private IEnumerator Process() { 34 | // Initialize GS2 SDK 35 | Gs2Domain gs2; 36 | { 37 | var future = Gs2Client.CreateFuture( 38 | new BasicGs2Credential( 39 | this.clientId, 40 | this.clientSecret 41 | ), 42 | Region.ApNortheast1 43 | ); 44 | yield return future; 45 | if (future.Error != null) { 46 | throw future.Error; 47 | } 48 | gs2 = future.Result; 49 | } 50 | 51 | // define GS2-Account namespace 52 | var gs2Account = gs2.Account.Namespace( 53 | this.accountNamespaceName 54 | ); 55 | 56 | // Create an anonymous account 57 | EzAccount account; 58 | { 59 | var future = gs2Account.CreateFuture(); 60 | yield return future; 61 | if (future.Error != null) { 62 | throw future.Error; 63 | } 64 | var future2 = future.Result.ModelFuture(); 65 | yield return future2; 66 | if (future2.Error != null) { 67 | throw future2.Error; 68 | } 69 | account = future2.Result; 70 | } 71 | // login 72 | GameSession gameSession; 73 | { 74 | var future = gs2.LoginFuture( 75 | new Gs2AccountAuthenticator( 76 | accountSetting: new AccountSetting { 77 | accountNamespaceName = this.accountNamespaceName, 78 | } 79 | ), 80 | account.UserId, 81 | account.Password 82 | ); 83 | yield return future; 84 | if (future.Error != null) { 85 | throw future.Error; 86 | } 87 | gameSession = future.Result; 88 | } 89 | // list takeover settings 90 | { 91 | var it = gs2Account.Me( 92 | gameSession 93 | ).TakeOvers(); 94 | while (it.HasNext()) { 95 | yield return it.Next(); 96 | var takeOver = it.Current; 97 | Debug.Log(takeOver.UserId); 98 | Debug.Log(takeOver.Type); 99 | Debug.Log(takeOver.UserIdentifier); 100 | } 101 | } 102 | } 103 | 104 | public void Start() { 105 | StartCoroutine(Process()); 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Globals: 4 | Alias: 5 | AccountNamespaceName: InGameCurrencyStore-Account 6 | MoneyNamespaceName: InGameCurrencyStore-Money 7 | ShowcaseNamespaceName: InGameCurrencyStore-Showcase 8 | 9 | Resources: 10 | AccountNamespace: 11 | Type: GS2::Account::Namespace 12 | Properties: 13 | Name: ${AccountNamespaceName} 14 | 15 | MoneyNamespace: 16 | Type: GS2::Money::Namespace 17 | Properties: 18 | Name: ${MoneyNamespaceName} 19 | Priority: free 20 | ShareFree: true 21 | Currency: JPY 22 | EnableFakeReceipt: true 23 | 24 | ShowcaseNamespace: 25 | Type: GS2::Showcase::Namespace 26 | Properties: 27 | Name: ${ShowcaseNamespaceName} 28 | TransactionSetting: 29 | EnableAutoRun: true 30 | 31 | ShowcaseMasterData: 32 | Type: GS2::Showcase::CurrentShowcaseMaster 33 | Properties: 34 | NamespaceName: InGameCurrencyStore-Showcase 35 | Settings: 36 | version: "2019-04-04" 37 | showcases: 38 | - name: GemStore 39 | displayItems: 40 | - type: salesItem 41 | salesItem: 42 | name: Tier1 43 | consumeActions: 44 | - action: Gs2Money:RecordReceipt 45 | request: 46 | namespaceName: ${MoneyNamespaceName} 47 | userId: "#{userId}" 48 | contentsId: "io.gs2.aoc.sample1" 49 | receipt: "#{receipt}" 50 | acquireActions: 51 | - action: Gs2Money:DepositByUserId 52 | request: 53 | namespaceName: ${MoneyNamespaceName} 54 | userId: "#{userId}" 55 | slot: 0 56 | price: 100 57 | count: 100 58 | - type: salesItem 59 | salesItem: 60 | name: Tier2 61 | consumeActions: 62 | - action: Gs2Money:RecordReceipt 63 | request: 64 | namespaceName: ${MoneyNamespaceName} 65 | userId: "#{userId}" 66 | contentsId: "io.gs2.aoc.sample1" 67 | receipt: "#{receipt}" 68 | acquireActions: 69 | - action: Gs2Money:DepositByUserId 70 | request: 71 | namespaceName: ${MoneyNamespaceName} 72 | userId: "#{userId}" 73 | slot: 0 74 | price: 500 75 | count: 530 76 | - type: salesItem 77 | salesItem: 78 | name: Tier2-Dash 79 | consumeActions: 80 | - action: Gs2Money:RecordReceipt 81 | request: 82 | namespaceName: ${MoneyNamespaceName} 83 | userId: "#{userId}" 84 | contentsId: "io.gs2.aoc.sample1" 85 | receipt: "#{receipt}" 86 | acquireActions: 87 | - action: Gs2Money:DepositByUserId 88 | request: 89 | namespaceName: ${MoneyNamespaceName} 90 | userId: "#{userId}" 91 | slot: 0 92 | price: 500 93 | count: 500 94 | - action: Gs2Money:DepositByUserId 95 | request: 96 | namespaceName: ${MoneyNamespaceName} 97 | userId: "#{userId}" 98 | slot: 0 99 | price: 0 100 | count: 30 101 | DependsOn: 102 | - ShowcaseNamespace -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/TakeOverAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using System; 19 | using Cysharp.Threading.Tasks.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Util; 23 | using UnityEngine; 24 | using Cysharp.Threading.Tasks; 25 | 26 | namespace Gs2.Sample.Simple 27 | { 28 | public class TakeOverAsync : MonoBehaviour 29 | { 30 | public string clientId; 31 | public string clientSecret; 32 | 33 | public string accountNamespaceName; 34 | 35 | private async UniTask ProcessAsync() { 36 | // Initialize GS2 SDK 37 | var gs2 = await Gs2Client.CreateAsync( 38 | new BasicGs2Credential( 39 | clientId, 40 | clientSecret 41 | ), 42 | Region.ApNortheast1 43 | ); 44 | 45 | // define GS2-Account namespace 46 | var gs2Account = gs2.Account.Namespace( 47 | this.accountNamespaceName 48 | ); 49 | 50 | // Create an anonymous account 51 | var account = await ( 52 | await gs2Account.CreateAsync() 53 | ).ModelAsync(); 54 | 55 | // login 56 | var gameSession = await gs2.LoginAsync( 57 | new Gs2AccountAuthenticator( 58 | accountSetting: new AccountSetting { 59 | accountNamespaceName = this.accountNamespaceName, 60 | } 61 | ), 62 | account.UserId, 63 | account.Password 64 | ); 65 | 66 | var email = Guid.NewGuid() + "@example.com"; 67 | 68 | // add takeover setting 69 | await gs2Account.Me( 70 | gameSession 71 | ).TakeOver( 72 | 0 73 | ).AddTakeOverSettingAsync( 74 | email, 75 | "password" 76 | ); 77 | 78 | // Forget about the anonymous account created 79 | account = null; 80 | 81 | // Execute takeover 82 | account = await ( 83 | await gs2Account.DoTakeOverAsync( 84 | 0, 85 | email, 86 | "password" 87 | ) 88 | ).ModelAsync(); 89 | 90 | // re-login 91 | gameSession = await gs2.LoginAsync( 92 | new Gs2AccountAuthenticator( 93 | accountSetting: new AccountSetting { 94 | accountNamespaceName = this.accountNamespaceName, 95 | } 96 | ), 97 | account.UserId, 98 | account.Password 99 | ); 100 | 101 | // list takeover settings 102 | var takeOvers = await gs2Account.Me( 103 | gameSession 104 | ).TakeOversAsync().ToListAsync(); 105 | foreach (var takeOver in takeOvers) { 106 | Debug.Log(takeOver.UserId); 107 | Debug.Log(takeOver.Type); 108 | Debug.Log(takeOver.UserIdentifier); 109 | } 110 | } 111 | 112 | public void Start() { 113 | StartCoroutine(ProcessAsync().ToCoroutine()); 114 | } 115 | } 116 | } 117 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/LoginRewardAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using System.Linq; 19 | using Cysharp.Threading.Tasks; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Util; 23 | using UnityEngine; 24 | 25 | namespace Gs2.Sample.Simple 26 | { 27 | public class LoginRewardAsync : MonoBehaviour 28 | { 29 | public string clientId; 30 | public string clientSecret; 31 | 32 | public string accountNamespaceName; 33 | public string moneyNamespaceName; 34 | public string loginRewardNamespaceName; 35 | public string loginRewardBonusName; 36 | 37 | private async UniTask ProcessAsync() { 38 | // Initialize GS2 SDK 39 | var gs2 = await Gs2Client.CreateAsync( 40 | new BasicGs2Credential( 41 | clientId, 42 | clientSecret 43 | ), 44 | Region.ApNortheast1 45 | ); 46 | 47 | // Create an anonymous account 48 | var account = await ( 49 | await gs2.Account.Namespace( 50 | this.accountNamespaceName 51 | ).CreateAsync() 52 | ).ModelAsync(); 53 | 54 | // login 55 | var gameSession = await gs2.LoginAsync( 56 | new Gs2AccountAuthenticator( 57 | accountSetting: new AccountSetting { 58 | accountNamespaceName = this.accountNamespaceName, 59 | } 60 | ), 61 | account.UserId, 62 | account.Password 63 | ); 64 | 65 | // fetch wallet 66 | var wallet = await gs2.Money.Namespace( 67 | this.moneyNamespaceName 68 | ).Me( 69 | gameSession 70 | ).Wallet( 71 | 0 72 | ).ModelAsync(); 73 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 74 | 75 | // subscribe wallet 76 | gs2.Money.Namespace( 77 | this.moneyNamespaceName 78 | ).Me( 79 | gameSession 80 | ).Wallet( 81 | 0 82 | ).Subscribe(wallet => 83 | { 84 | Debug.Log("Change Wallet: " + (wallet.Free + wallet.Paid)); 85 | }); 86 | 87 | // fetch rewards 88 | var bonus = await gs2.LoginReward.Namespace( 89 | this.loginRewardNamespaceName 90 | ).BonusModel( 91 | this.loginRewardBonusName 92 | ).ModelAsync( 93 | ); 94 | 95 | // display rewards 96 | foreach (var reward in bonus.Rewards) { 97 | Debug.Log("Day: " + (bonus.Rewards.IndexOf(reward) + 1)); 98 | Debug.Log("AcquireActions: " + string.Join(", ", reward.AcquireActions.Select(v => v.Action))); 99 | } 100 | 101 | // receive rewards 102 | var transaction = await gs2.LoginReward.Namespace( 103 | this.loginRewardNamespaceName 104 | ).Me( 105 | gameSession 106 | ).Bonus( 107 | ).ReceiveAsync( 108 | this.loginRewardBonusName 109 | ); 110 | 111 | // wait receive process 112 | await transaction.WaitAsync(true); 113 | 114 | // fetch wallet 115 | wallet = await gs2.Money.Namespace( 116 | this.moneyNamespaceName 117 | ).Me( 118 | gameSession 119 | ).Wallet( 120 | 0 121 | ).ModelAsync(); 122 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 123 | } 124 | 125 | public void Start() { 126 | StartCoroutine(ProcessAsync().ToCoroutine()); 127 | } 128 | } 129 | } 130 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/LotteryAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using Cysharp.Threading.Tasks; 19 | using Cysharp.Threading.Tasks.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Util; 23 | using UnityEngine; 24 | 25 | namespace Gs2.Sample.Simple 26 | { 27 | public class LotteryAsync : MonoBehaviour 28 | { 29 | public string clientId; 30 | public string clientSecret; 31 | 32 | public string accountNamespaceName; 33 | public string lotteryNamespaceName; 34 | public string inventoryNamespaceName; 35 | public string inventoryName; 36 | public string exchangeNamespaceName; 37 | public string exchangeRateName; 38 | 39 | private async UniTask ProcessAsync() { 40 | // Initialize GS2 SDK 41 | var gs2 = await Gs2Client.CreateAsync( 42 | new BasicGs2Credential( 43 | clientId, 44 | clientSecret 45 | ), 46 | Region.ApNortheast1 47 | ); 48 | 49 | // Create an anonymous account 50 | var account = await ( 51 | await gs2.Account.Namespace( 52 | this.accountNamespaceName 53 | ).CreateAsync() 54 | ).ModelAsync(); 55 | 56 | // login 57 | var gameSession = await gs2.LoginAsync( 58 | new Gs2AccountAuthenticator( 59 | accountSetting: new AccountSetting { 60 | accountNamespaceName = this.accountNamespaceName, 61 | } 62 | ), 63 | account.UserId, 64 | account.Password 65 | ); 66 | 67 | // clear gacha result buffer 68 | gs2.Lottery.ClearDrawnResult(this.lotteryNamespaceName); 69 | 70 | // draw gacha 71 | var transaction = await gs2.Exchange.Namespace( 72 | this.exchangeNamespaceName 73 | ).Me( 74 | gameSession 75 | ).Exchange( 76 | ).ExchangeAsync( 77 | this.exchangeRateName, 78 | 1 79 | ); 80 | 81 | // wait lottery process 82 | // This wait processing is not necessary. The purchase process can operate asynchronously without invoking this wait process. 83 | // Also, even if the purchase process is not yet complete, GS2-SDK will cause the acquisition type API to respond with the anticipated value ahead of time // even if the purchase process is not yet complete if the resource change after the purchase is predictable. 84 | // The preemptively reflected contents of the local cache from this speculative execution will be maintained for 10 seconds, and if the process is not completed within that time, the latest value will be retrieved from the server again. 85 | await transaction.WaitAsync(true); 86 | 87 | // fetch gacha results 88 | var drawnPrizes = await gs2.Lottery.Namespace( 89 | this.lotteryNamespaceName 90 | ).Me( 91 | gameSession 92 | ).Lottery( 93 | ).DrawnPrizesAsync().ToListAsync(); 94 | 95 | foreach (var drawnPrize in drawnPrizes) { 96 | Debug.Log("DrawnPrize: " + drawnPrize.PrizeId); 97 | } 98 | 99 | // fetch inventory 100 | var itemSets = await gs2.Inventory.Namespace( 101 | this.inventoryNamespaceName 102 | ).Me( 103 | gameSession 104 | ).Inventory( 105 | this.inventoryName 106 | ).ItemSetsAsync().ToListAsync(); 107 | 108 | foreach (var itemSet in itemSets) { 109 | Debug.Log("HeldItem: " + itemSet.ItemName + ", " + itemSet.Count); 110 | } 111 | } 112 | 113 | public void Start() { 114 | StartCoroutine(ProcessAsync().ToCoroutine()); 115 | } 116 | } 117 | } 118 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/RankingAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using System; 19 | using Cysharp.Threading.Tasks.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Util; 23 | using UnityEngine; 24 | using Cysharp.Threading.Tasks; 25 | using UnityEditor; 26 | using Random = System.Random; 27 | 28 | namespace Gs2.Sample.Simple 29 | { 30 | public class RankingAsync : MonoBehaviour 31 | { 32 | public string clientId; 33 | public string clientSecret; 34 | 35 | public string accountNamespaceName; 36 | public string rankingNamespaceName; 37 | public string rankingCategoryName; 38 | 39 | private async UniTask ProcessAsync() { 40 | // Initialize GS2 SDK 41 | var gs2 = await Gs2Client.CreateAsync( 42 | new BasicGs2Credential( 43 | clientId, 44 | clientSecret 45 | ), 46 | Region.ApNortheast1 47 | ); 48 | 49 | // define GS2-Account namespace 50 | var gs2Account = gs2.Account.Namespace( 51 | this.accountNamespaceName 52 | ); 53 | 54 | // Create an anonymous account 55 | var account = await ( 56 | await gs2Account.CreateAsync() 57 | ).ModelAsync(); 58 | 59 | // login 60 | var gameSession = await gs2.LoginAsync( 61 | new Gs2AccountAuthenticator( 62 | accountSetting: new AccountSetting { 63 | accountNamespaceName = this.accountNamespaceName, 64 | } 65 | ), 66 | account.UserId, 67 | account.Password 68 | ); 69 | 70 | // generate score 71 | var score = Math.Abs(new Random().Next()); 72 | 73 | // define GS2-Account namespace 74 | var gs2Ranking = gs2.Ranking.Namespace( 75 | this.rankingNamespaceName 76 | ); 77 | 78 | // put score 79 | await gs2Ranking.Me( 80 | gameSession 81 | ).Ranking( 82 | this.rankingCategoryName 83 | ).PutScoreAsync( 84 | score, 85 | "metadata" 86 | ); 87 | 88 | // fetch ranking result 89 | var ranking = await gs2Ranking.Me( 90 | gameSession 91 | ).Ranking( 92 | this.rankingCategoryName 93 | ).ModelAsync( 94 | gameSession.AccessToken.UserId 95 | ); 96 | 97 | // Rankings are compiled at intervals determined by the master data, and rankings immediately after scores are updated are estimated approximately based on the most recent compiled results. 98 | // If you need to calculate an exact ranking, please use the results that can be obtained after the score registration has been terminated and the timing of the tally has been reached. 99 | 100 | // The ranking model has two fields with very similar properties: index and rank. 101 | // The index stores the order from the beginning with no duplicates, and the rank is numbered in such a way that if others have the same score, the same value is used. 102 | // 103 | // A simple example is shown below. 104 | // Index: 1, 2, 3 105 | // Rank: 1, 1, 3 106 | Debug.Log("Index: " + ranking.Index); 107 | Debug.Log("Rank: " + ranking.Rank); 108 | Debug.Log("Score: " + ranking.Score); 109 | 110 | // fetch list ranking 111 | var rankings = await gs2Ranking.Me( 112 | gameSession 113 | ).RankingsAsync( 114 | this.rankingCategoryName 115 | ).Take(30).ToListAsync(); 116 | 117 | foreach (var rank in rankings) { 118 | Debug.Log("Index: " + rank.Index + ", Rank: " + rank.Rank + ", Score: " + rank.Score + ", UserId: " + rank.UserId); 119 | } 120 | } 121 | 122 | public void Start() { 123 | StartCoroutine(ProcessAsync().ToCoroutine()); 124 | } 125 | } 126 | } 127 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/CloudSaveFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System.Collections; 18 | using System.Collections.Generic; 19 | using System.Text; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Gs2Account.Model; 23 | using Gs2.Unity.Util; 24 | using UnityEngine; 25 | 26 | namespace Gs2.Sample.Simple 27 | { 28 | public class CloudSaveFuture : MonoBehaviour 29 | { 30 | public string clientId; 31 | public string clientSecret; 32 | 33 | public string accountNamespaceName; 34 | public string datastoreNamespaceName; 35 | 36 | private IEnumerator Process() { 37 | // Initialize GS2 SDK 38 | Gs2Domain gs2; 39 | { 40 | var future = Gs2Client.CreateFuture( 41 | new BasicGs2Credential( 42 | this.clientId, 43 | this.clientSecret 44 | ), 45 | Region.ApNortheast1 46 | ); 47 | yield return future; 48 | if (future.Error != null) { 49 | throw future.Error; 50 | } 51 | gs2 = future.Result; 52 | } 53 | 54 | // define GS2-Account namespace 55 | var gs2Account = gs2.Account.Namespace( 56 | this.accountNamespaceName 57 | ); 58 | 59 | // Create an anonymous account 60 | EzAccount account; 61 | { 62 | var future = gs2Account.CreateFuture(); 63 | yield return future; 64 | if (future.Error != null) { 65 | throw future.Error; 66 | } 67 | var future2 = future.Result.ModelFuture(); 68 | yield return future2; 69 | if (future2.Error != null) { 70 | throw future2.Error; 71 | } 72 | account = future2.Result; 73 | } 74 | 75 | // login 76 | GameSession gameSession; 77 | { 78 | var future = gs2.LoginFuture( 79 | new Gs2AccountAuthenticator( 80 | accountSetting: new AccountSetting { 81 | accountNamespaceName = this.accountNamespaceName, 82 | } 83 | ), 84 | account.UserId, 85 | account.Password 86 | ); 87 | yield return future; 88 | if (future.Error != null) { 89 | throw future.Error; 90 | } 91 | gameSession = future.Result; 92 | } 93 | 94 | // define GS2-Datastore namespace 95 | var gs2Datastore = gs2.Datastore.Namespace( 96 | this.datastoreNamespaceName 97 | ); 98 | 99 | // define save data 100 | var saveData = new byte[] { 101 | (byte) 'A', (byte) 'B', (byte) 'C' 102 | }; 103 | 104 | // upload save data 105 | { 106 | var future = gs2Datastore.Me( 107 | gameSession 108 | ).UploadFuture( 109 | "public", 110 | new List(), 111 | saveData, 112 | "PublicData" 113 | ); 114 | yield return future; 115 | if (future.Error != null) { 116 | throw future.Error; 117 | } 118 | } 119 | 120 | // download save data 121 | byte[] downloadedSaveData; 122 | { 123 | var future = gs2Datastore.Me( 124 | gameSession 125 | ).DataObject( 126 | "PublicData" 127 | ).DownloadFuture(); 128 | yield return future; 129 | if (future.Error != null) { 130 | throw future.Error; 131 | } 132 | downloadedSaveData = future.Result; 133 | } 134 | 135 | Debug.Log(Encoding.ASCII.GetString(downloadedSaveData)); 136 | } 137 | 138 | public void Start() { 139 | StartCoroutine(Process()); 140 | } 141 | } 142 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/template.yaml: -------------------------------------------------------------------------------- 1 | GS2TemplateFormatVersion: "2019-05-01" 2 | 3 | Globals: 4 | Alias: 5 | AccountNamespaceName: Lottery-Account 6 | LotteryNamespaceName: Lottery 7 | NormalLotteryName: Normal 8 | RareLotteryName: Rare 9 | InventoryNamespaceName: Lottery-Inventory 10 | InventoryName: Bag 11 | ExchangeNamespaceName: Lottery-Exchange 12 | ExchangeName: Gacha 13 | 14 | Resources: 15 | AccountNamespace: 16 | Type: GS2::Account::Namespace 17 | Properties: 18 | Name: ${AccountNamespaceName} 19 | 20 | LotteryNamespace: 21 | Type: GS2::Lottery::Namespace 22 | Properties: 23 | Name: ${LotteryNamespaceName} 24 | TransactionSetting: 25 | EnableAutoRun: true 26 | 27 | LotteryMasterData: 28 | Type: GS2::Lottery::CurrentLotteryMaster 29 | Properties: 30 | NamespaceName: ${LotteryNamespaceName} 31 | Settings: 32 | version: 2019-02-21 33 | lotteryModels: 34 | - name: ${NormalLotteryName} 35 | mode: normal 36 | method: prize_table 37 | prizeTableName: ${NormalLotteryName} 38 | - name: ${RareLotteryName} 39 | mode: normal 40 | method: prize_table 41 | prizeTableName: ${RareLotteryName} 42 | prizeTables: 43 | - name: ${NormalLotteryName} 44 | prizes: 45 | - prizeId: Prize-0001 46 | type: action 47 | acquireActions: 48 | - action: Gs2Inventory:AcquireItemSetByUserId 49 | request: 50 | namespaceName: ${InventoryNamespaceName} 51 | inventoryName: ${InventoryName} 52 | itemName: Item-0001 53 | userId: "#{userId}" 54 | acquireCount: 1 55 | weight: 50 56 | - prizeId: Prize-0002 57 | type: action 58 | acquireActions: 59 | - action: Gs2Inventory:AcquireItemSetByUserId 60 | request: 61 | namespaceName: ${InventoryNamespaceName} 62 | inventoryName: ${InventoryName} 63 | itemName: Item-0002 64 | userId: "#{userId}" 65 | acquireCount: 1 66 | weight: 50 67 | - name: ${RareLotteryName} 68 | prizes: 69 | - prizeId: Prize-0003 70 | type: action 71 | acquireActions: 72 | - action: Gs2Inventory:AcquireItemSetByUserId 73 | request: 74 | namespaceName: ${InventoryNamespaceName} 75 | inventoryName: ${InventoryName} 76 | itemName: Item-0003 77 | userId: "#{userId}" 78 | acquireCount: 1 79 | weight: 1 80 | DependsOn: 81 | - LotteryNamespace 82 | 83 | InventoryNamespace: 84 | Type: GS2::Inventory::Namespace 85 | Properties: 86 | Name: ${InventoryNamespaceName} 87 | 88 | InventoryMasterData: 89 | Type: GS2::Inventory::CurrentItemModelMaster 90 | Properties: 91 | NamespaceName: ${InventoryNamespaceName} 92 | Settings: 93 | version: 2019-02-05 94 | inventoryModels: 95 | - name: ${InventoryName} 96 | initialCapacity: 10 97 | maxCapacity: 10 98 | itemModels: 99 | - name: Item-0001 100 | stackingLimit: 99 101 | allowMultipleStacks: false 102 | sortValue: 1 103 | - name: Item-0002 104 | stackingLimit: 99 105 | allowMultipleStacks: false 106 | sortValue: 2 107 | - name: Item-0003 108 | stackingLimit: 99 109 | allowMultipleStacks: false 110 | sortValue: 3 111 | DependsOn: 112 | - InventoryNamespace 113 | 114 | ExchangeNamespace: 115 | Type: GS2::Exchange::Namespace 116 | Properties: 117 | Name: ${ExchangeNamespaceName} 118 | TransactionSetting: 119 | EnableAutoRun: true 120 | 121 | ExchangeMasterData: 122 | Type: GS2::Exchange::CurrentRateMaster 123 | Properties: 124 | NamespaceName: ${ExchangeNamespaceName} 125 | Settings: 126 | version: 2019-08-19 127 | rateModels: 128 | - name: ${ExchangeName} 129 | consumeActions: [] 130 | acquireActions: 131 | - action: Gs2Lottery:DrawByUserId 132 | request: 133 | namespaceName: ${LotteryNamespaceName} 134 | lotteryName: ${NormalLotteryName} 135 | userId: "#{userId}" 136 | count: 9 137 | - action: Gs2Lottery:DrawByUserId 138 | request: 139 | namespaceName: ${LotteryNamespaceName} 140 | lotteryName: ${RareLotteryName} 141 | userId: "#{userId}" 142 | count: 1 143 | DependsOn: 144 | - ExchangeNamespace -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/TakeOverFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections; 19 | using Gs2.Core.Model; 20 | using Gs2.Unity.Core; 21 | using Gs2.Unity.Gs2Account.Model; 22 | using Gs2.Unity.Util; 23 | using UnityEngine; 24 | 25 | namespace Gs2.Sample.Simple 26 | { 27 | public class TakeOverFuture : MonoBehaviour 28 | { 29 | public string clientId; 30 | public string clientSecret; 31 | 32 | public string accountNamespaceName; 33 | 34 | private IEnumerator Process() { 35 | // Initialize GS2 SDK 36 | Gs2Domain gs2; 37 | { 38 | var future = Gs2Client.CreateFuture( 39 | new BasicGs2Credential( 40 | this.clientId, 41 | this.clientSecret 42 | ), 43 | Region.ApNortheast1 44 | ); 45 | yield return future; 46 | if (future.Error != null) { 47 | throw future.Error; 48 | } 49 | gs2 = future.Result; 50 | } 51 | 52 | // define GS2-Account namespace 53 | var gs2Account = gs2.Account.Namespace( 54 | this.accountNamespaceName 55 | ); 56 | 57 | // Create an anonymous account 58 | EzAccount account; 59 | { 60 | var future = gs2Account.CreateFuture(); 61 | yield return future; 62 | if (future.Error != null) { 63 | throw future.Error; 64 | } 65 | var future2 = future.Result.ModelFuture(); 66 | yield return future2; 67 | if (future2.Error != null) { 68 | throw future2.Error; 69 | } 70 | account = future2.Result; 71 | } 72 | 73 | // login 74 | GameSession gameSession; 75 | { 76 | var future = gs2.LoginFuture( 77 | new Gs2AccountAuthenticator( 78 | accountSetting: new AccountSetting { 79 | accountNamespaceName = this.accountNamespaceName, 80 | } 81 | ), 82 | account.UserId, 83 | account.Password 84 | ); 85 | yield return future; 86 | if (future.Error != null) { 87 | throw future.Error; 88 | } 89 | gameSession = future.Result; 90 | } 91 | 92 | var email = Guid.NewGuid() + "@example.com"; 93 | 94 | // add takeover setting 95 | { 96 | var future = gs2Account.Me( 97 | gameSession 98 | ).TakeOver( 99 | 0 100 | ).AddTakeOverSettingFuture( 101 | email, 102 | "password" 103 | ); 104 | yield return future; 105 | if (future.Error != null) { 106 | throw future.Error; 107 | } 108 | } 109 | 110 | // Forget about the anonymous account created 111 | account = null; 112 | 113 | // Execute takeover 114 | { 115 | var future = gs2Account.DoTakeOverFuture( 116 | 0, 117 | email, 118 | "password" 119 | ); 120 | yield return future; 121 | if (future.Error != null) { 122 | throw future.Error; 123 | } 124 | var future2 = future.Result.ModelFuture(); 125 | yield return future2; 126 | if (future2.Error != null) { 127 | throw future2.Error; 128 | } 129 | account = future2.Result; 130 | } 131 | 132 | // re-login 133 | { 134 | var future = gs2.LoginFuture( 135 | new Gs2AccountAuthenticator( 136 | accountSetting: new AccountSetting { 137 | accountNamespaceName = this.accountNamespaceName, 138 | } 139 | ), 140 | account.UserId, 141 | account.Password 142 | ); 143 | yield return future; 144 | if (future.Error != null) { 145 | throw future.Error; 146 | } 147 | gameSession = future.Result; 148 | } 149 | 150 | // list takeover settings 151 | { 152 | var it = gs2Account.Me( 153 | gameSession 154 | ).TakeOvers(); 155 | while (it.HasNext()) { 156 | yield return it.Next(); 157 | var takeOver = it.Current; 158 | Debug.Log(takeOver.UserId); 159 | Debug.Log(takeOver.Type); 160 | Debug.Log(takeOver.UserIdentifier); 161 | } 162 | } 163 | } 164 | 165 | public void Start() { 166 | StartCoroutine(Process()); 167 | } 168 | } 169 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/RankingFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System; 18 | using System.Collections; 19 | using Cysharp.Threading.Tasks.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Gs2Account.Model; 23 | using Gs2.Unity.Gs2Ranking.Model; 24 | using Gs2.Unity.Util; 25 | using UnityEngine; 26 | using Random = System.Random; 27 | 28 | namespace Gs2.Sample.Simple 29 | { 30 | public class RankingFuture : MonoBehaviour 31 | { 32 | public string clientId; 33 | public string clientSecret; 34 | 35 | public string accountNamespaceName; 36 | public string rankingNamespaceName; 37 | public string rankingCategoryName; 38 | 39 | private IEnumerator Process() { 40 | // Initialize GS2 SDK 41 | Gs2Domain gs2; 42 | { 43 | var future = Gs2Client.CreateFuture( 44 | new BasicGs2Credential( 45 | this.clientId, 46 | this.clientSecret 47 | ), 48 | Region.ApNortheast1 49 | ); 50 | yield return future; 51 | if (future.Error != null) { 52 | throw future.Error; 53 | } 54 | gs2 = future.Result; 55 | } 56 | 57 | // define GS2-Account namespace 58 | var gs2Account = gs2.Account.Namespace( 59 | this.accountNamespaceName 60 | ); 61 | 62 | // Create an anonymous account 63 | EzAccount account; 64 | { 65 | var future = gs2.Account.Namespace( 66 | this.accountNamespaceName 67 | ).CreateFuture(); 68 | yield return future; 69 | if (future.Error != null) { 70 | throw future.Error; 71 | } 72 | var future2 = future.Result.ModelFuture(); 73 | yield return future2; 74 | if (future2.Error != null) { 75 | throw future2.Error; 76 | } 77 | account = future2.Result; 78 | } 79 | 80 | // login 81 | GameSession gameSession; 82 | { 83 | var future = gs2.LoginFuture( 84 | new Gs2AccountAuthenticator( 85 | accountSetting: new AccountSetting { 86 | accountNamespaceName = this.accountNamespaceName, 87 | } 88 | ), 89 | account.UserId, 90 | account.Password 91 | ); 92 | yield return future; 93 | if (future.Error != null) { 94 | throw future.Error; 95 | } 96 | gameSession = future.Result; 97 | } 98 | 99 | // generate score 100 | var score = Math.Abs(new Random().Next()); 101 | 102 | // define GS2-Account namespace 103 | var gs2Ranking = gs2.Ranking.Namespace( 104 | this.rankingNamespaceName 105 | ); 106 | 107 | // put score 108 | { 109 | var future = gs2Ranking.Me( 110 | gameSession 111 | ).Ranking( 112 | this.rankingCategoryName 113 | ).PutScoreFuture( 114 | score, 115 | "metadata" 116 | ); 117 | yield return future; 118 | if (future.Error != null) { 119 | throw future.Error; 120 | } 121 | } 122 | 123 | // fetch ranking result 124 | EzRanking ranking; 125 | { 126 | var future = gs2Ranking.Me( 127 | gameSession 128 | ).Ranking( 129 | this.rankingCategoryName 130 | ).ModelFuture( 131 | gameSession.AccessToken.UserId 132 | ); 133 | yield return future; 134 | if (future.Error != null) { 135 | throw future.Error; 136 | } 137 | ranking = future.Result; 138 | } 139 | 140 | // Rankings are compiled at intervals determined by the master data, and rankings immediately after scores are updated are estimated approximately based on the most recent compiled results. 141 | // If you need to calculate an exact ranking, please use the results that can be obtained after the score registration has been terminated and the timing of the tally has been reached. 142 | 143 | // The ranking model has two fields with very similar properties: index and rank. 144 | // The index stores the order from the beginning with no duplicates, and the rank is numbered in such a way that if others have the same score, the same value is used. 145 | // 146 | // A simple example is shown below. 147 | // Index: 1, 2, 3 148 | // Rank: 1, 1, 3 149 | Debug.Log("Index: " + ranking.Index); 150 | Debug.Log("Rank: " + ranking.Rank); 151 | Debug.Log("Score: " + ranking.Score); 152 | 153 | // fetch list ranking 154 | var it = gs2Ranking.Me( 155 | gameSession 156 | ).Rankings( 157 | this.rankingCategoryName 158 | ); 159 | 160 | for (var i=0; i<30 && it.HasNext(); i++) { 161 | yield return it.Next(); 162 | if (it.Error != null) { 163 | throw it.Error; 164 | } 165 | var rank = it.Current; 166 | Debug.Log("Index: " + rank.Index + ", Rank: " + rank.Rank + ", Score: " + rank.Score + ", UserId: " + rank.UserId); 167 | } 168 | } 169 | 170 | public void Start() { 171 | StartCoroutine(Process()); 172 | } 173 | } 174 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/InGameCurrencyStoreAsync.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | #if GS2_ENABLE_UNITASK 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Util; 23 | using UnityEngine; 24 | using Cysharp.Threading.Tasks; 25 | using Gs2.Gs2Money.Request; 26 | using Gs2.Unity.Gs2Showcase.Model; 27 | using Gs2.Util.LitJson; 28 | 29 | namespace Gs2.Sample.Simple 30 | { 31 | public class InGameCurrencyStoreAsync : MonoBehaviour 32 | { 33 | public string clientId; 34 | public string clientSecret; 35 | 36 | public string accountNamespaceName; 37 | public string moneyNamespaceName; 38 | public string showcaseNamespaceName; 39 | public string showcaseName; 40 | 41 | private async UniTask ProcessAsync() { 42 | // Initialize GS2 SDK 43 | var gs2 = await Gs2Client.CreateAsync( 44 | new BasicGs2Credential( 45 | clientId, 46 | clientSecret 47 | ), 48 | Region.ApNortheast1 49 | ); 50 | 51 | // Create an anonymous account 52 | var account = await ( 53 | await gs2.Account.Namespace( 54 | this.accountNamespaceName 55 | ).CreateAsync() 56 | ).ModelAsync(); 57 | 58 | // login 59 | var gameSession = await gs2.LoginAsync( 60 | new Gs2AccountAuthenticator( 61 | accountSetting: new AccountSetting { 62 | accountNamespaceName = this.accountNamespaceName, 63 | } 64 | ), 65 | account.UserId, 66 | account.Password 67 | ); 68 | 69 | // fetch wallet 70 | var wallet = await gs2.Money.Namespace( 71 | this.moneyNamespaceName 72 | ).Me( 73 | gameSession 74 | ).Wallet( 75 | 0 76 | ).ModelAsync(); 77 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 78 | 79 | // subscribe wallet 80 | gs2.Money.Namespace( 81 | this.moneyNamespaceName 82 | ).Me( 83 | gameSession 84 | ).Wallet( 85 | 0 86 | ).Subscribe(wallet => 87 | { 88 | Debug.Log("Change Wallet: " + (wallet.Free + wallet.Paid)); 89 | }); 90 | 91 | // fetch showcase 92 | var showcase = await gs2.Showcase.Namespace( 93 | this.showcaseNamespaceName 94 | ).Me( 95 | gameSession 96 | ).Showcase( 97 | this.showcaseName 98 | ).ModelAsync(); 99 | 100 | // display sales items 101 | foreach (var displayItem in showcase.DisplayItems) { 102 | Debug.Log("Name: " + displayItem.SalesItem.Name); 103 | Debug.Log("ConsumeActions: " + string.Join(", ", displayItem.SalesItem.ConsumeActions.Select(v => v.Action))); 104 | Debug.Log("AcquireActions: " + string.Join(", ", displayItem.SalesItem.AcquireActions.Select(v => v.Action))); 105 | } 106 | 107 | var configs = new List(); 108 | #if !GS2_ENABLE_PURCHASING 109 | Debug.LogError("Unity IAP must be installed for this sample to work."); 110 | #else 111 | // purchase store platform 112 | PurchaseParameters purchaseParameters = null; 113 | var needReceipt = showcase.DisplayItems[0].SalesItem.ConsumeActions.FirstOrDefault( 114 | v => v.Action == "Gs2Money:RecordReceipt" 115 | ); 116 | if (needReceipt != null) { 117 | var request = RecordReceiptRequest.FromJson(JsonMapper.ToObject(needReceipt.Request)); 118 | purchaseParameters = await new IAPUtil().BuyAsync(request.ContentsId); 119 | configs.Add(new EzConfig { 120 | Key = "receipt", 121 | Value = purchaseParameters.receipt, 122 | }); 123 | } 124 | #endif 125 | 126 | // buy 1st product 127 | var transaction = await gs2.Showcase.Namespace( 128 | this.showcaseNamespaceName 129 | ).Me( 130 | gameSession 131 | ).Showcase( 132 | showcaseName 133 | ).DisplayItem( 134 | showcase.DisplayItems[0].DisplayItemId 135 | ).BuyAsync( 136 | 1, 137 | configs.ToArray() 138 | ); 139 | 140 | // wait purchase process 141 | // This wait processing is not necessary. The purchase process can operate asynchronously without invoking this wait process. 142 | // Also, even if the purchase process is not yet complete, GS2-SDK will cause the acquisition type API to respond with the anticipated value ahead of time // even if the purchase process is not yet complete if the resource change after the purchase is predictable. 143 | // The preemptively reflected contents of the local cache from this speculative execution will be maintained for 10 seconds, and if the process is not completed within that time, the latest value will be retrieved from the server again. 144 | await transaction.WaitAsync(true); 145 | 146 | #if GS2_ENABLE_PURCHASING 147 | if (purchaseParameters != null) { 148 | // confirm store platform 149 | purchaseParameters.controller.ConfirmPendingPurchase(purchaseParameters.product); 150 | } 151 | #endif 152 | // fetch wallet 153 | wallet = await gs2.Money.Namespace( 154 | this.moneyNamespaceName 155 | ).Me( 156 | gameSession 157 | ).Wallet( 158 | 0 159 | ).ModelAsync(); 160 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 161 | } 162 | 163 | public void Start() { 164 | StartCoroutine(ProcessAsync().ToCoroutine()); 165 | } 166 | } 167 | } 168 | #endif -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/LoginRewardFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System.Collections; 18 | using System.Linq; 19 | using Gs2.Core.Model; 20 | using Gs2.Unity.Core; 21 | using Gs2.Unity.Gs2Account.Model; 22 | using Gs2.Unity.Gs2LoginReward.Model; 23 | using Gs2.Unity.Gs2Money.Model; 24 | using Gs2.Unity.Util; 25 | using UnityEngine; 26 | 27 | namespace Gs2.Sample.Simple 28 | { 29 | public class LoginRewardFuture : MonoBehaviour 30 | { 31 | public string clientId; 32 | public string clientSecret; 33 | 34 | public string accountNamespaceName; 35 | public string moneyNamespaceName; 36 | public string loginRewardNamespaceName; 37 | public string loginRewardBonusName; 38 | 39 | private IEnumerator Process() { 40 | // Initialize GS2 SDK 41 | Gs2Domain gs2; 42 | { 43 | var future = Gs2Client.CreateFuture( 44 | new BasicGs2Credential( 45 | this.clientId, 46 | this.clientSecret 47 | ), 48 | Region.ApNortheast1 49 | ); 50 | yield return future; 51 | if (future.Error != null) { 52 | throw future.Error; 53 | } 54 | gs2 = future.Result; 55 | } 56 | 57 | // Create an anonymous account 58 | EzAccount account; 59 | { 60 | var future = gs2.Account.Namespace( 61 | this.accountNamespaceName 62 | ).CreateFuture(); 63 | yield return future; 64 | if (future.Error != null) { 65 | throw future.Error; 66 | } 67 | var future2 = future.Result.ModelFuture(); 68 | yield return future2; 69 | if (future2.Error != null) { 70 | throw future2.Error; 71 | } 72 | account = future2.Result; 73 | } 74 | 75 | // login 76 | GameSession gameSession; 77 | { 78 | var future = gs2.LoginFuture( 79 | new Gs2AccountAuthenticator( 80 | accountSetting: new AccountSetting { 81 | accountNamespaceName = this.accountNamespaceName, 82 | } 83 | ), 84 | account.UserId, 85 | account.Password 86 | ); 87 | yield return future; 88 | if (future.Error != null) { 89 | throw future.Error; 90 | } 91 | gameSession = future.Result; 92 | } 93 | 94 | // fetch wallet 95 | EzWallet wallet; 96 | { 97 | var future = gs2.Money.Namespace( 98 | this.moneyNamespaceName 99 | ).Me( 100 | gameSession 101 | ).Wallet( 102 | 0 103 | ).ModelFuture(); 104 | yield return future; 105 | if (future.Error != null) { 106 | throw future.Error; 107 | } 108 | wallet = future.Result; 109 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 110 | } 111 | 112 | // subscribe wallet 113 | gs2.Money.Namespace( 114 | this.moneyNamespaceName 115 | ).Me( 116 | gameSession 117 | ).Wallet( 118 | 0 119 | ).Subscribe(wallet => 120 | { 121 | Debug.Log("Change Wallet: " + (wallet.Free + wallet.Paid)); 122 | }); 123 | 124 | // fetch rewards 125 | EzBonusModel bonus; 126 | { 127 | var future = gs2.LoginReward.Namespace( 128 | this.loginRewardNamespaceName 129 | ).BonusModel( 130 | this.loginRewardBonusName 131 | ).ModelFuture(); 132 | yield return future; 133 | if (future.Error != null) { 134 | throw future.Error; 135 | } 136 | bonus = future.Result; 137 | } 138 | 139 | // display rewards 140 | foreach (var reward in bonus.Rewards) { 141 | Debug.Log("Day: " + (bonus.Rewards.IndexOf(reward) + 1)); 142 | Debug.Log("AcquireActions: " + string.Join(", ", reward.AcquireActions.Select(v => v.Action))); 143 | } 144 | 145 | // receive rewards 146 | { 147 | var future = gs2.LoginReward.Namespace( 148 | this.loginRewardNamespaceName 149 | ).Me( 150 | gameSession 151 | ).Bonus( 152 | ).ReceiveFuture( 153 | this.loginRewardBonusName 154 | ); 155 | yield return future; 156 | if (future.Error != null) { 157 | throw future.Error; 158 | } 159 | var transaction = future.Result; 160 | 161 | // wait receive process 162 | var future2 = transaction.WaitFuture(true); 163 | yield return future2; 164 | if (future2.Error != null) { 165 | throw future2.Error; 166 | } 167 | } 168 | 169 | // fetch wallet 170 | { 171 | var future = gs2.Money.Namespace( 172 | this.moneyNamespaceName 173 | ).Me( 174 | gameSession 175 | ).Wallet( 176 | 0 177 | ).ModelFuture(); 178 | yield return future; 179 | if (future.Error != null) { 180 | throw future.Error; 181 | } 182 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 183 | } 184 | } 185 | 186 | public void Start() { 187 | StartCoroutine(Process()); 188 | } 189 | } 190 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/LotteryFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System.Collections; 18 | using System.Collections.Generic; 19 | using Cysharp.Threading.Tasks.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Unity.Core; 22 | using Gs2.Unity.Gs2Account.Model; 23 | using Gs2.Unity.Gs2Inventory.Model; 24 | using Gs2.Unity.Gs2Lottery.Model; 25 | using Gs2.Unity.Util; 26 | using UnityEngine; 27 | 28 | namespace Gs2.Sample.Simple 29 | { 30 | public class LotteryFuture : MonoBehaviour 31 | { 32 | public string clientId; 33 | public string clientSecret; 34 | 35 | public string accountNamespaceName; 36 | public string lotteryNamespaceName; 37 | public string inventoryNamespaceName; 38 | public string inventoryName; 39 | public string exchangeNamespaceName; 40 | public string exchangeRateName; 41 | 42 | private IEnumerator Process() { 43 | // Initialize GS2 SDK 44 | Gs2Domain gs2; 45 | { 46 | var future = Gs2Client.CreateFuture( 47 | new BasicGs2Credential( 48 | this.clientId, 49 | this.clientSecret 50 | ), 51 | Region.ApNortheast1 52 | ); 53 | yield return future; 54 | if (future.Error != null) { 55 | throw future.Error; 56 | } 57 | gs2 = future.Result; 58 | } 59 | 60 | // Create an anonymous account 61 | EzAccount account; 62 | { 63 | var future = gs2.Account.Namespace( 64 | this.accountNamespaceName 65 | ).CreateFuture(); 66 | yield return future; 67 | if (future.Error != null) { 68 | throw future.Error; 69 | } 70 | var future2 = future.Result.ModelFuture(); 71 | yield return future2; 72 | if (future2.Error != null) { 73 | throw future2.Error; 74 | } 75 | account = future2.Result; 76 | } 77 | 78 | // login 79 | GameSession gameSession; 80 | { 81 | var future = gs2.LoginFuture( 82 | new Gs2AccountAuthenticator( 83 | accountSetting: new AccountSetting { 84 | accountNamespaceName = this.accountNamespaceName, 85 | } 86 | ), 87 | account.UserId, 88 | account.Password 89 | ); 90 | yield return future; 91 | if (future.Error != null) { 92 | throw future.Error; 93 | } 94 | gameSession = future.Result; 95 | } 96 | 97 | // clear gacha result buffer 98 | gs2.Lottery.ClearDrawnResult(this.lotteryNamespaceName); 99 | 100 | // draw gacha 101 | { 102 | var future = gs2.Exchange.Namespace( 103 | this.exchangeNamespaceName 104 | ).Me( 105 | gameSession 106 | ).Exchange( 107 | ).ExchangeFuture( 108 | this.exchangeRateName, 109 | 1 110 | ); 111 | yield return future; 112 | if (future.Error != null) { 113 | throw future.Error; 114 | } 115 | var transaction = future.Result; 116 | 117 | // wait lottery process 118 | // This wait processing is not necessary. The purchase process can operate asynchronously without invoking this wait process. 119 | // Also, even if the purchase process is not yet complete, GS2-SDK will cause the acquisition type API to respond with the anticipated value ahead of time // even if the purchase process is not yet complete if the resource change after the purchase is predictable. 120 | // The preemptively reflected contents of the local cache from this speculative execution will be maintained for 10 seconds, and if the process is not completed within that time, the latest value will be retrieved from the server again. 121 | var future2 = transaction.WaitFuture(true); 122 | yield return future2; 123 | if (future2.Error != null) { 124 | throw future2.Error; 125 | } 126 | } 127 | 128 | // fetch gacha results 129 | var drawnPrizes = new List(); 130 | { 131 | var it = gs2.Lottery.Namespace( 132 | this.lotteryNamespaceName 133 | ).Me( 134 | gameSession 135 | ).Lottery( 136 | ).DrawnPrizes(); 137 | while (it.HasNext()) { 138 | yield return it.Next(); 139 | if (it.Error != null) { 140 | throw it.Error; 141 | } 142 | drawnPrizes.Add(it.Current); 143 | } 144 | } 145 | 146 | foreach (var drawnPrize in drawnPrizes) { 147 | Debug.Log("DrawnPrize: " + drawnPrize.PrizeId); 148 | } 149 | 150 | // fetch inventory 151 | var itemSets = new List(); 152 | { 153 | var it = gs2.Inventory.Namespace( 154 | this.inventoryNamespaceName 155 | ).Me( 156 | gameSession 157 | ).Inventory( 158 | this.inventoryName 159 | ).ItemSets(); 160 | while (it.HasNext()) { 161 | yield return it.Next(); 162 | if (it.Error != null) { 163 | throw it.Error; 164 | } 165 | itemSets.Add(it.Current); 166 | } 167 | } 168 | 169 | foreach (var itemSet in itemSets) { 170 | Debug.Log("HeldItem: " + itemSet.ItemName + ", " + itemSet.Count); 171 | } 172 | } 173 | 174 | public void Start() { 175 | StartCoroutine(Process()); 176 | } 177 | } 178 | } -------------------------------------------------------------------------------- /unity/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /unity/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Stadia: 5 227 | Standalone: 5 228 | WebGL: 3 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/InGameCurrencyStoreFuture.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights 3 | * Reserved. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"). 6 | * You may not use this file except in compliance with the License. 7 | * A copy of the License is located at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * or in the "license" file accompanying this file. This file is distributed 12 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 | * express or implied. See the License for the specific language governing 14 | * permissions and limitations under the License. 15 | */ 16 | 17 | using System.Collections; 18 | using System.Collections.Generic; 19 | using System.Linq; 20 | using Gs2.Core.Model; 21 | using Gs2.Gs2Money.Request; 22 | using Gs2.Unity.Core; 23 | using Gs2.Unity.Gs2Account.Model; 24 | using Gs2.Unity.Gs2Money.Model; 25 | using Gs2.Unity.Gs2Showcase.Model; 26 | using Gs2.Unity.Util; 27 | using Gs2.Util.LitJson; 28 | using UnityEngine; 29 | 30 | namespace Gs2.Sample.Simple 31 | { 32 | public class InGameCurrencyStoreFuture : MonoBehaviour 33 | { 34 | public string clientId; 35 | public string clientSecret; 36 | 37 | public string accountNamespaceName; 38 | public string moneyNamespaceName; 39 | public string showcaseNamespaceName; 40 | public string showcaseName; 41 | 42 | private IEnumerator Process() { 43 | // Initialize GS2 SDK 44 | Gs2Domain gs2; 45 | { 46 | var future = Gs2Client.CreateFuture( 47 | new BasicGs2Credential( 48 | this.clientId, 49 | this.clientSecret 50 | ), 51 | Region.ApNortheast1 52 | ); 53 | yield return future; 54 | if (future.Error != null) { 55 | throw future.Error; 56 | } 57 | gs2 = future.Result; 58 | } 59 | 60 | // Create an anonymous account 61 | EzAccount account; 62 | { 63 | var future = gs2.Account.Namespace( 64 | this.accountNamespaceName 65 | ).CreateFuture(); 66 | yield return future; 67 | if (future.Error != null) { 68 | throw future.Error; 69 | } 70 | var future2 = future.Result.ModelFuture(); 71 | yield return future2; 72 | if (future2.Error != null) { 73 | throw future2.Error; 74 | } 75 | account = future2.Result; 76 | } 77 | 78 | // login 79 | GameSession gameSession; 80 | { 81 | var future = gs2.LoginFuture( 82 | new Gs2AccountAuthenticator( 83 | accountSetting: new AccountSetting { 84 | accountNamespaceName = this.accountNamespaceName, 85 | } 86 | ), 87 | account.UserId, 88 | account.Password 89 | ); 90 | yield return future; 91 | if (future.Error != null) { 92 | throw future.Error; 93 | } 94 | gameSession = future.Result; 95 | } 96 | 97 | // fetch wallet 98 | EzWallet wallet; 99 | { 100 | var future = gs2.Money.Namespace( 101 | this.moneyNamespaceName 102 | ).Me( 103 | gameSession 104 | ).Wallet( 105 | 0 106 | ).ModelFuture(); 107 | yield return future; 108 | if (future.Error != null) { 109 | throw future.Error; 110 | } 111 | wallet = future.Result; 112 | Debug.Log("Wallet: " + (wallet.Free + wallet.Paid)); 113 | } 114 | 115 | // subscribe wallet 116 | gs2.Money.Namespace( 117 | this.moneyNamespaceName 118 | ).Me( 119 | gameSession 120 | ).Wallet( 121 | 0 122 | ).Subscribe(wallet => 123 | { 124 | Debug.Log("Change Wallet: " + (wallet.Free + wallet.Paid)); 125 | }); 126 | 127 | // fetch showcase 128 | EzShowcase showcase; 129 | { 130 | var future = gs2.Showcase.Namespace( 131 | this.showcaseNamespaceName 132 | ).Me( 133 | gameSession 134 | ).Showcase( 135 | this.showcaseName 136 | ).ModelFuture(); 137 | yield return future; 138 | if (future.Error != null) { 139 | throw future.Error; 140 | } 141 | showcase = future.Result; 142 | } 143 | 144 | // display sales items 145 | foreach (var displayItem in showcase.DisplayItems) { 146 | Debug.Log("Name: " + displayItem.SalesItem.Name); 147 | Debug.Log("ConsumeActions: " + string.Join(", ", displayItem.SalesItem.ConsumeActions.Select(v => v.Action))); 148 | Debug.Log("AcquireActions: " + string.Join(", ", displayItem.SalesItem.AcquireActions.Select(v => v.Action))); 149 | } 150 | 151 | var configs = new List(); 152 | #if !GS2_ENABLE_PURCHASING 153 | Debug.LogError("Unity IAP must be installed for this sample to work."); 154 | #else 155 | // purchase store platform 156 | PurchaseParameters purchaseParameters = null; 157 | var needReceipt = showcase.DisplayItems[0].SalesItem.ConsumeActions.FirstOrDefault( 158 | v => v.Action == "Gs2Money:RecordReceipt" 159 | ); 160 | if (needReceipt != null) { 161 | var request = RecordReceiptRequest.FromJson(JsonMapper.ToObject(needReceipt.Request)); 162 | var future = new IAPUtil().BuyFuture(request.ContentsId); 163 | yield return future; 164 | if (future.Error != null) { 165 | throw future.Error; 166 | } 167 | purchaseParameters = future.Result; 168 | configs.Add(new EzConfig { 169 | Key = "receipt", 170 | Value = purchaseParameters.receipt, 171 | }); 172 | } 173 | #endif 174 | 175 | // buy 1st product 176 | { 177 | var future = gs2.Showcase.Namespace( 178 | this.showcaseNamespaceName 179 | ).Me( 180 | gameSession 181 | ).Showcase( 182 | showcaseName 183 | ).DisplayItem( 184 | showcase.DisplayItems[0].DisplayItemId 185 | ).BuyFuture( 186 | 1, 187 | configs.ToArray() 188 | ); 189 | yield return future; 190 | if (future.Error != null) { 191 | throw future.Error; 192 | } 193 | var transaction = future.Result; 194 | 195 | // wait purchase process 196 | // This wait processing is not necessary. The purchase process can operate asynchronously without invoking this wait process. 197 | // Also, even if the purchase process is not yet complete, GS2-SDK will cause the acquisition type API to respond with the anticipated value ahead of time // even if the purchase process is not yet complete if the resource change after the purchase is predictable. 198 | // The preemptively reflected contents of the local cache from this speculative execution will be maintained for 10 seconds, and if the process is not completed within that time, the latest value will be retrieved from the server again. 199 | var future2 = transaction.WaitFuture(true); 200 | yield return future2; 201 | if (future2.Error != null) { 202 | throw future2.Error; 203 | } 204 | } 205 | 206 | #if GS2_ENABLE_PURCHASING 207 | if (purchaseParameters != null) { 208 | // confirm store platform 209 | purchaseParameters.controller.ConfirmPendingPurchase(purchaseParameters.product); 210 | } 211 | #endif 212 | 213 | // fetch wallet again 214 | { 215 | var future = gs2.Money.Namespace( 216 | this.moneyNamespaceName 217 | ).Me( 218 | gameSession 219 | ).Wallet( 220 | 0 221 | ).ModelFuture(); 222 | yield return future; 223 | if (future.Error != null) { 224 | throw future.Error; 225 | } 226 | wallet = future.Result; 227 | Debug.Log("Wallet Free: " + wallet.Free); 228 | Debug.Log("Wallet Paid: " + wallet.Paid); 229 | } 230 | } 231 | 232 | public void Start() { 233 | StartCoroutine(Process()); 234 | } 235 | } 236 | } -------------------------------------------------------------------------------- /unity/Assets/Scenes/Login/Login.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335599} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!114 &1939335599 228 | MonoBehaviour: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_Enabled: 1 235 | m_EditorHideFlags: 0 236 | m_Script: {fileID: 11500000, guid: 33000a68017a4eca99e5d86fc928a619, type: 3} 237 | m_Name: 238 | m_EditorClassIdentifier: 239 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 240 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 241 | accountNamespaceName: Login 242 | --- !u!4 &1939335600 243 | Transform: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 250 | m_LocalPosition: {x: 0, y: 0, z: 0} 251 | m_LocalScale: {x: 1, y: 1, z: 1} 252 | m_ConstrainProportionsScale: 0 253 | m_Children: [] 254 | m_Father: {fileID: 0} 255 | m_RootOrder: 2 256 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 257 | --- !u!1 &1959892170 258 | GameObject: 259 | m_ObjectHideFlags: 0 260 | m_CorrespondingSourceObject: {fileID: 0} 261 | m_PrefabInstance: {fileID: 0} 262 | m_PrefabAsset: {fileID: 0} 263 | serializedVersion: 6 264 | m_Component: 265 | - component: {fileID: 1959892172} 266 | - component: {fileID: 1959892171} 267 | m_Layer: 0 268 | m_Name: Directional Light 269 | m_TagString: Untagged 270 | m_Icon: {fileID: 0} 271 | m_NavMeshLayer: 0 272 | m_StaticEditorFlags: 0 273 | m_IsActive: 1 274 | --- !u!108 &1959892171 275 | Light: 276 | m_ObjectHideFlags: 0 277 | m_CorrespondingSourceObject: {fileID: 0} 278 | m_PrefabInstance: {fileID: 0} 279 | m_PrefabAsset: {fileID: 0} 280 | m_GameObject: {fileID: 1959892170} 281 | m_Enabled: 1 282 | serializedVersion: 10 283 | m_Type: 1 284 | m_Shape: 0 285 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 286 | m_Intensity: 1 287 | m_Range: 10 288 | m_SpotAngle: 30 289 | m_InnerSpotAngle: 21.80208 290 | m_CookieSize: 10 291 | m_Shadows: 292 | m_Type: 2 293 | m_Resolution: -1 294 | m_CustomResolution: -1 295 | m_Strength: 1 296 | m_Bias: 0.05 297 | m_NormalBias: 0.4 298 | m_NearPlane: 0.2 299 | m_CullingMatrixOverride: 300 | e00: 1 301 | e01: 0 302 | e02: 0 303 | e03: 0 304 | e10: 0 305 | e11: 1 306 | e12: 0 307 | e13: 0 308 | e20: 0 309 | e21: 0 310 | e22: 1 311 | e23: 0 312 | e30: 0 313 | e31: 0 314 | e32: 0 315 | e33: 1 316 | m_UseCullingMatrixOverride: 0 317 | m_Cookie: {fileID: 0} 318 | m_DrawHalo: 0 319 | m_Flare: {fileID: 0} 320 | m_RenderMode: 0 321 | m_CullingMask: 322 | serializedVersion: 2 323 | m_Bits: 4294967295 324 | m_RenderingLayerMask: 1 325 | m_Lightmapping: 4 326 | m_LightShadowCasterMode: 0 327 | m_AreaSize: {x: 1, y: 1} 328 | m_BounceIntensity: 1 329 | m_ColorTemperature: 6570 330 | m_UseColorTemperature: 0 331 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 332 | m_UseBoundingSphereOverride: 0 333 | m_UseViewFrustumForShadowCasterCull: 1 334 | m_ShadowRadius: 0 335 | m_ShadowAngle: 0 336 | --- !u!4 &1959892172 337 | Transform: 338 | m_ObjectHideFlags: 0 339 | m_CorrespondingSourceObject: {fileID: 0} 340 | m_PrefabInstance: {fileID: 0} 341 | m_PrefabAsset: {fileID: 0} 342 | m_GameObject: {fileID: 1959892170} 343 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 344 | m_LocalPosition: {x: 0, y: 3, z: 0} 345 | m_LocalScale: {x: 1, y: 1, z: 1} 346 | m_ConstrainProportionsScale: 0 347 | m_Children: [] 348 | m_Father: {fileID: 0} 349 | m_RootOrder: 1 350 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 351 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/TakeOver/TakeOver.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335601} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!4 &1939335600 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 0, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_ConstrainProportionsScale: 0 238 | m_Children: [] 239 | m_Father: {fileID: 0} 240 | m_RootOrder: 2 241 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 242 | --- !u!114 &1939335601 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: 7e18d3a469324d7db1613c597f17c635, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 255 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 256 | accountNamespaceName: TakeOver 257 | --- !u!1 &1959892170 258 | GameObject: 259 | m_ObjectHideFlags: 0 260 | m_CorrespondingSourceObject: {fileID: 0} 261 | m_PrefabInstance: {fileID: 0} 262 | m_PrefabAsset: {fileID: 0} 263 | serializedVersion: 6 264 | m_Component: 265 | - component: {fileID: 1959892172} 266 | - component: {fileID: 1959892171} 267 | m_Layer: 0 268 | m_Name: Directional Light 269 | m_TagString: Untagged 270 | m_Icon: {fileID: 0} 271 | m_NavMeshLayer: 0 272 | m_StaticEditorFlags: 0 273 | m_IsActive: 1 274 | --- !u!108 &1959892171 275 | Light: 276 | m_ObjectHideFlags: 0 277 | m_CorrespondingSourceObject: {fileID: 0} 278 | m_PrefabInstance: {fileID: 0} 279 | m_PrefabAsset: {fileID: 0} 280 | m_GameObject: {fileID: 1959892170} 281 | m_Enabled: 1 282 | serializedVersion: 10 283 | m_Type: 1 284 | m_Shape: 0 285 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 286 | m_Intensity: 1 287 | m_Range: 10 288 | m_SpotAngle: 30 289 | m_InnerSpotAngle: 21.80208 290 | m_CookieSize: 10 291 | m_Shadows: 292 | m_Type: 2 293 | m_Resolution: -1 294 | m_CustomResolution: -1 295 | m_Strength: 1 296 | m_Bias: 0.05 297 | m_NormalBias: 0.4 298 | m_NearPlane: 0.2 299 | m_CullingMatrixOverride: 300 | e00: 1 301 | e01: 0 302 | e02: 0 303 | e03: 0 304 | e10: 0 305 | e11: 1 306 | e12: 0 307 | e13: 0 308 | e20: 0 309 | e21: 0 310 | e22: 1 311 | e23: 0 312 | e30: 0 313 | e31: 0 314 | e32: 0 315 | e33: 1 316 | m_UseCullingMatrixOverride: 0 317 | m_Cookie: {fileID: 0} 318 | m_DrawHalo: 0 319 | m_Flare: {fileID: 0} 320 | m_RenderMode: 0 321 | m_CullingMask: 322 | serializedVersion: 2 323 | m_Bits: 4294967295 324 | m_RenderingLayerMask: 1 325 | m_Lightmapping: 4 326 | m_LightShadowCasterMode: 0 327 | m_AreaSize: {x: 1, y: 1} 328 | m_BounceIntensity: 1 329 | m_ColorTemperature: 6570 330 | m_UseColorTemperature: 0 331 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 332 | m_UseBoundingSphereOverride: 0 333 | m_UseViewFrustumForShadowCasterCull: 1 334 | m_ShadowRadius: 0 335 | m_ShadowAngle: 0 336 | --- !u!4 &1959892172 337 | Transform: 338 | m_ObjectHideFlags: 0 339 | m_CorrespondingSourceObject: {fileID: 0} 340 | m_PrefabInstance: {fileID: 0} 341 | m_PrefabAsset: {fileID: 0} 342 | m_GameObject: {fileID: 1959892170} 343 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 344 | m_LocalPosition: {x: 0, y: 3, z: 0} 345 | m_LocalScale: {x: 1, y: 1, z: 1} 346 | m_ConstrainProportionsScale: 0 347 | m_Children: [] 348 | m_Father: {fileID: 0} 349 | m_RootOrder: 1 350 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 351 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/CloudSave/CloudSave.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335601} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!4 &1939335600 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 0, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_ConstrainProportionsScale: 0 238 | m_Children: [] 239 | m_Father: {fileID: 0} 240 | m_RootOrder: 2 241 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 242 | --- !u!114 &1939335601 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: e1f5011a53b440e1904e0884fa61d311, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 255 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 256 | accountNamespaceName: CloudSave-Account 257 | datastoreNamespaceName: CloudSave-Datastore 258 | --- !u!1 &1959892170 259 | GameObject: 260 | m_ObjectHideFlags: 0 261 | m_CorrespondingSourceObject: {fileID: 0} 262 | m_PrefabInstance: {fileID: 0} 263 | m_PrefabAsset: {fileID: 0} 264 | serializedVersion: 6 265 | m_Component: 266 | - component: {fileID: 1959892172} 267 | - component: {fileID: 1959892171} 268 | m_Layer: 0 269 | m_Name: Directional Light 270 | m_TagString: Untagged 271 | m_Icon: {fileID: 0} 272 | m_NavMeshLayer: 0 273 | m_StaticEditorFlags: 0 274 | m_IsActive: 1 275 | --- !u!108 &1959892171 276 | Light: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | m_GameObject: {fileID: 1959892170} 282 | m_Enabled: 1 283 | serializedVersion: 10 284 | m_Type: 1 285 | m_Shape: 0 286 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 287 | m_Intensity: 1 288 | m_Range: 10 289 | m_SpotAngle: 30 290 | m_InnerSpotAngle: 21.80208 291 | m_CookieSize: 10 292 | m_Shadows: 293 | m_Type: 2 294 | m_Resolution: -1 295 | m_CustomResolution: -1 296 | m_Strength: 1 297 | m_Bias: 0.05 298 | m_NormalBias: 0.4 299 | m_NearPlane: 0.2 300 | m_CullingMatrixOverride: 301 | e00: 1 302 | e01: 0 303 | e02: 0 304 | e03: 0 305 | e10: 0 306 | e11: 1 307 | e12: 0 308 | e13: 0 309 | e20: 0 310 | e21: 0 311 | e22: 1 312 | e23: 0 313 | e30: 0 314 | e31: 0 315 | e32: 0 316 | e33: 1 317 | m_UseCullingMatrixOverride: 0 318 | m_Cookie: {fileID: 0} 319 | m_DrawHalo: 0 320 | m_Flare: {fileID: 0} 321 | m_RenderMode: 0 322 | m_CullingMask: 323 | serializedVersion: 2 324 | m_Bits: 4294967295 325 | m_RenderingLayerMask: 1 326 | m_Lightmapping: 4 327 | m_LightShadowCasterMode: 0 328 | m_AreaSize: {x: 1, y: 1} 329 | m_BounceIntensity: 1 330 | m_ColorTemperature: 6570 331 | m_UseColorTemperature: 0 332 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 333 | m_UseBoundingSphereOverride: 0 334 | m_UseViewFrustumForShadowCasterCull: 1 335 | m_ShadowRadius: 0 336 | m_ShadowAngle: 0 337 | --- !u!4 &1959892172 338 | Transform: 339 | m_ObjectHideFlags: 0 340 | m_CorrespondingSourceObject: {fileID: 0} 341 | m_PrefabInstance: {fileID: 0} 342 | m_PrefabAsset: {fileID: 0} 343 | m_GameObject: {fileID: 1959892170} 344 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 345 | m_LocalPosition: {x: 0, y: 3, z: 0} 346 | m_LocalScale: {x: 1, y: 1, z: 1} 347 | m_ConstrainProportionsScale: 0 348 | m_Children: [] 349 | m_Father: {fileID: 0} 350 | m_RootOrder: 1 351 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 352 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Ranking/Ranking.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335601} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!4 &1939335600 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 0, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_ConstrainProportionsScale: 0 238 | m_Children: [] 239 | m_Father: {fileID: 0} 240 | m_RootOrder: 2 241 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 242 | --- !u!114 &1939335601 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: 5a5832ed78484e94a44d21d1c3c6cd2a, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 255 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 256 | accountNamespaceName: Ranking-Account 257 | rankingNamespaceName: Ranking 258 | rankingCategoryName: Category 259 | --- !u!1 &1959892170 260 | GameObject: 261 | m_ObjectHideFlags: 0 262 | m_CorrespondingSourceObject: {fileID: 0} 263 | m_PrefabInstance: {fileID: 0} 264 | m_PrefabAsset: {fileID: 0} 265 | serializedVersion: 6 266 | m_Component: 267 | - component: {fileID: 1959892172} 268 | - component: {fileID: 1959892171} 269 | m_Layer: 0 270 | m_Name: Directional Light 271 | m_TagString: Untagged 272 | m_Icon: {fileID: 0} 273 | m_NavMeshLayer: 0 274 | m_StaticEditorFlags: 0 275 | m_IsActive: 1 276 | --- !u!108 &1959892171 277 | Light: 278 | m_ObjectHideFlags: 0 279 | m_CorrespondingSourceObject: {fileID: 0} 280 | m_PrefabInstance: {fileID: 0} 281 | m_PrefabAsset: {fileID: 0} 282 | m_GameObject: {fileID: 1959892170} 283 | m_Enabled: 1 284 | serializedVersion: 10 285 | m_Type: 1 286 | m_Shape: 0 287 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 288 | m_Intensity: 1 289 | m_Range: 10 290 | m_SpotAngle: 30 291 | m_InnerSpotAngle: 21.80208 292 | m_CookieSize: 10 293 | m_Shadows: 294 | m_Type: 2 295 | m_Resolution: -1 296 | m_CustomResolution: -1 297 | m_Strength: 1 298 | m_Bias: 0.05 299 | m_NormalBias: 0.4 300 | m_NearPlane: 0.2 301 | m_CullingMatrixOverride: 302 | e00: 1 303 | e01: 0 304 | e02: 0 305 | e03: 0 306 | e10: 0 307 | e11: 1 308 | e12: 0 309 | e13: 0 310 | e20: 0 311 | e21: 0 312 | e22: 1 313 | e23: 0 314 | e30: 0 315 | e31: 0 316 | e32: 0 317 | e33: 1 318 | m_UseCullingMatrixOverride: 0 319 | m_Cookie: {fileID: 0} 320 | m_DrawHalo: 0 321 | m_Flare: {fileID: 0} 322 | m_RenderMode: 0 323 | m_CullingMask: 324 | serializedVersion: 2 325 | m_Bits: 4294967295 326 | m_RenderingLayerMask: 1 327 | m_Lightmapping: 4 328 | m_LightShadowCasterMode: 0 329 | m_AreaSize: {x: 1, y: 1} 330 | m_BounceIntensity: 1 331 | m_ColorTemperature: 6570 332 | m_UseColorTemperature: 0 333 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 334 | m_UseBoundingSphereOverride: 0 335 | m_UseViewFrustumForShadowCasterCull: 1 336 | m_ShadowRadius: 0 337 | m_ShadowAngle: 0 338 | --- !u!4 &1959892172 339 | Transform: 340 | m_ObjectHideFlags: 0 341 | m_CorrespondingSourceObject: {fileID: 0} 342 | m_PrefabInstance: {fileID: 0} 343 | m_PrefabAsset: {fileID: 0} 344 | m_GameObject: {fileID: 1959892170} 345 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 346 | m_LocalPosition: {x: 0, y: 3, z: 0} 347 | m_LocalScale: {x: 1, y: 1, z: 1} 348 | m_ConstrainProportionsScale: 0 349 | m_Children: [] 350 | m_Father: {fileID: 0} 351 | m_RootOrder: 1 352 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 353 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/LoginReward/LoginReward.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335601} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!4 &1939335600 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 0, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_ConstrainProportionsScale: 0 238 | m_Children: [] 239 | m_Father: {fileID: 0} 240 | m_RootOrder: 2 241 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 242 | --- !u!114 &1939335601 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: 818b18f88da94dcebed5fd5c39e7b33d, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 255 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 256 | accountNamespaceName: LoginReward-Account 257 | moneyNamespaceName: LoginReward-Money 258 | loginRewardNamespaceName: LoginReward 259 | loginRewardBonusName: Reward 260 | --- !u!1 &1959892170 261 | GameObject: 262 | m_ObjectHideFlags: 0 263 | m_CorrespondingSourceObject: {fileID: 0} 264 | m_PrefabInstance: {fileID: 0} 265 | m_PrefabAsset: {fileID: 0} 266 | serializedVersion: 6 267 | m_Component: 268 | - component: {fileID: 1959892172} 269 | - component: {fileID: 1959892171} 270 | m_Layer: 0 271 | m_Name: Directional Light 272 | m_TagString: Untagged 273 | m_Icon: {fileID: 0} 274 | m_NavMeshLayer: 0 275 | m_StaticEditorFlags: 0 276 | m_IsActive: 1 277 | --- !u!108 &1959892171 278 | Light: 279 | m_ObjectHideFlags: 0 280 | m_CorrespondingSourceObject: {fileID: 0} 281 | m_PrefabInstance: {fileID: 0} 282 | m_PrefabAsset: {fileID: 0} 283 | m_GameObject: {fileID: 1959892170} 284 | m_Enabled: 1 285 | serializedVersion: 10 286 | m_Type: 1 287 | m_Shape: 0 288 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 289 | m_Intensity: 1 290 | m_Range: 10 291 | m_SpotAngle: 30 292 | m_InnerSpotAngle: 21.80208 293 | m_CookieSize: 10 294 | m_Shadows: 295 | m_Type: 2 296 | m_Resolution: -1 297 | m_CustomResolution: -1 298 | m_Strength: 1 299 | m_Bias: 0.05 300 | m_NormalBias: 0.4 301 | m_NearPlane: 0.2 302 | m_CullingMatrixOverride: 303 | e00: 1 304 | e01: 0 305 | e02: 0 306 | e03: 0 307 | e10: 0 308 | e11: 1 309 | e12: 0 310 | e13: 0 311 | e20: 0 312 | e21: 0 313 | e22: 1 314 | e23: 0 315 | e30: 0 316 | e31: 0 317 | e32: 0 318 | e33: 1 319 | m_UseCullingMatrixOverride: 0 320 | m_Cookie: {fileID: 0} 321 | m_DrawHalo: 0 322 | m_Flare: {fileID: 0} 323 | m_RenderMode: 0 324 | m_CullingMask: 325 | serializedVersion: 2 326 | m_Bits: 4294967295 327 | m_RenderingLayerMask: 1 328 | m_Lightmapping: 4 329 | m_LightShadowCasterMode: 0 330 | m_AreaSize: {x: 1, y: 1} 331 | m_BounceIntensity: 1 332 | m_ColorTemperature: 6570 333 | m_UseColorTemperature: 0 334 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 335 | m_UseBoundingSphereOverride: 0 336 | m_UseViewFrustumForShadowCasterCull: 1 337 | m_ShadowRadius: 0 338 | m_ShadowAngle: 0 339 | --- !u!4 &1959892172 340 | Transform: 341 | m_ObjectHideFlags: 0 342 | m_CorrespondingSourceObject: {fileID: 0} 343 | m_PrefabInstance: {fileID: 0} 344 | m_PrefabAsset: {fileID: 0} 345 | m_GameObject: {fileID: 1959892170} 346 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 347 | m_LocalPosition: {x: 0, y: 3, z: 0} 348 | m_LocalScale: {x: 1, y: 1, z: 1} 349 | m_ConstrainProportionsScale: 0 350 | m_Children: [] 351 | m_Father: {fileID: 0} 352 | m_RootOrder: 1 353 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 354 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/InGameCurrencyStore/InGameCurrencyStore.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335601} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!4 &1939335600 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 0, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_ConstrainProportionsScale: 0 238 | m_Children: [] 239 | m_Father: {fileID: 0} 240 | m_RootOrder: 2 241 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 242 | --- !u!114 &1939335601 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: d29a056460fa497a98978618ebe31c02, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 255 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 256 | accountNamespaceName: InGameCurrencyStore-Account 257 | moneyNamespaceName: InGameCurrencyStore-Money 258 | showcaseNamespaceName: InGameCurrencyStore-Showcase 259 | showcaseName: GemStore 260 | --- !u!1 &1959892170 261 | GameObject: 262 | m_ObjectHideFlags: 0 263 | m_CorrespondingSourceObject: {fileID: 0} 264 | m_PrefabInstance: {fileID: 0} 265 | m_PrefabAsset: {fileID: 0} 266 | serializedVersion: 6 267 | m_Component: 268 | - component: {fileID: 1959892172} 269 | - component: {fileID: 1959892171} 270 | m_Layer: 0 271 | m_Name: Directional Light 272 | m_TagString: Untagged 273 | m_Icon: {fileID: 0} 274 | m_NavMeshLayer: 0 275 | m_StaticEditorFlags: 0 276 | m_IsActive: 1 277 | --- !u!108 &1959892171 278 | Light: 279 | m_ObjectHideFlags: 0 280 | m_CorrespondingSourceObject: {fileID: 0} 281 | m_PrefabInstance: {fileID: 0} 282 | m_PrefabAsset: {fileID: 0} 283 | m_GameObject: {fileID: 1959892170} 284 | m_Enabled: 1 285 | serializedVersion: 10 286 | m_Type: 1 287 | m_Shape: 0 288 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 289 | m_Intensity: 1 290 | m_Range: 10 291 | m_SpotAngle: 30 292 | m_InnerSpotAngle: 21.80208 293 | m_CookieSize: 10 294 | m_Shadows: 295 | m_Type: 2 296 | m_Resolution: -1 297 | m_CustomResolution: -1 298 | m_Strength: 1 299 | m_Bias: 0.05 300 | m_NormalBias: 0.4 301 | m_NearPlane: 0.2 302 | m_CullingMatrixOverride: 303 | e00: 1 304 | e01: 0 305 | e02: 0 306 | e03: 0 307 | e10: 0 308 | e11: 1 309 | e12: 0 310 | e13: 0 311 | e20: 0 312 | e21: 0 313 | e22: 1 314 | e23: 0 315 | e30: 0 316 | e31: 0 317 | e32: 0 318 | e33: 1 319 | m_UseCullingMatrixOverride: 0 320 | m_Cookie: {fileID: 0} 321 | m_DrawHalo: 0 322 | m_Flare: {fileID: 0} 323 | m_RenderMode: 0 324 | m_CullingMask: 325 | serializedVersion: 2 326 | m_Bits: 4294967295 327 | m_RenderingLayerMask: 1 328 | m_Lightmapping: 4 329 | m_LightShadowCasterMode: 0 330 | m_AreaSize: {x: 1, y: 1} 331 | m_BounceIntensity: 1 332 | m_ColorTemperature: 6570 333 | m_UseColorTemperature: 0 334 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 335 | m_UseBoundingSphereOverride: 0 336 | m_UseViewFrustumForShadowCasterCull: 1 337 | m_ShadowRadius: 0 338 | m_ShadowAngle: 0 339 | --- !u!4 &1959892172 340 | Transform: 341 | m_ObjectHideFlags: 0 342 | m_CorrespondingSourceObject: {fileID: 0} 343 | m_PrefabInstance: {fileID: 0} 344 | m_PrefabAsset: {fileID: 0} 345 | m_GameObject: {fileID: 1959892170} 346 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 347 | m_LocalPosition: {x: 0, y: 3, z: 0} 348 | m_LocalScale: {x: 1, y: 1, z: 1} 349 | m_ConstrainProportionsScale: 0 350 | m_Children: [] 351 | m_Father: {fileID: 0} 352 | m_RootOrder: 1 353 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 354 | -------------------------------------------------------------------------------- /unity/Assets/Scenes/Lottery/Lottery.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &981901964 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 981901967} 135 | - component: {fileID: 981901966} 136 | - component: {fileID: 981901965} 137 | m_Layer: 0 138 | m_Name: Main Camera 139 | m_TagString: MainCamera 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!81 &981901965 145 | AudioListener: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 981901964} 151 | m_Enabled: 1 152 | --- !u!20 &981901966 153 | Camera: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 981901964} 159 | m_Enabled: 1 160 | serializedVersion: 2 161 | m_ClearFlags: 1 162 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 163 | m_projectionMatrixMode: 1 164 | m_GateFitMode: 2 165 | m_FOVAxisMode: 0 166 | m_SensorSize: {x: 36, y: 24} 167 | m_LensShift: {x: 0, y: 0} 168 | m_FocalLength: 50 169 | m_NormalizedViewPortRect: 170 | serializedVersion: 2 171 | x: 0 172 | y: 0 173 | width: 1 174 | height: 1 175 | near clip plane: 0.3 176 | far clip plane: 1000 177 | field of view: 60 178 | orthographic: 0 179 | orthographic size: 5 180 | m_Depth: -1 181 | m_CullingMask: 182 | serializedVersion: 2 183 | m_Bits: 4294967295 184 | m_RenderingPath: -1 185 | m_TargetTexture: {fileID: 0} 186 | m_TargetDisplay: 0 187 | m_TargetEye: 3 188 | m_HDR: 1 189 | m_AllowMSAA: 1 190 | m_AllowDynamicResolution: 0 191 | m_ForceIntoRT: 0 192 | m_OcclusionCulling: 1 193 | m_StereoConvergence: 10 194 | m_StereoSeparation: 0.022 195 | --- !u!4 &981901967 196 | Transform: 197 | m_ObjectHideFlags: 0 198 | m_CorrespondingSourceObject: {fileID: 0} 199 | m_PrefabInstance: {fileID: 0} 200 | m_PrefabAsset: {fileID: 0} 201 | m_GameObject: {fileID: 981901964} 202 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 203 | m_LocalPosition: {x: 0, y: 1, z: -10} 204 | m_LocalScale: {x: 1, y: 1, z: 1} 205 | m_ConstrainProportionsScale: 0 206 | m_Children: [] 207 | m_Father: {fileID: 0} 208 | m_RootOrder: 0 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!1 &1939335598 211 | GameObject: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | serializedVersion: 6 217 | m_Component: 218 | - component: {fileID: 1939335600} 219 | - component: {fileID: 1939335601} 220 | m_Layer: 0 221 | m_Name: GameObject 222 | m_TagString: Untagged 223 | m_Icon: {fileID: 0} 224 | m_NavMeshLayer: 0 225 | m_StaticEditorFlags: 0 226 | m_IsActive: 1 227 | --- !u!4 &1939335600 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 1939335598} 234 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 235 | m_LocalPosition: {x: 0, y: 0, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_ConstrainProportionsScale: 0 238 | m_Children: [] 239 | m_Father: {fileID: 0} 240 | m_RootOrder: 2 241 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 242 | --- !u!114 &1939335601 243 | MonoBehaviour: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1939335598} 249 | m_Enabled: 1 250 | m_EditorHideFlags: 0 251 | m_Script: {fileID: 11500000, guid: 2be2ced19d2440d9b030dac19d273bc8, type: 3} 252 | m_Name: 253 | m_EditorClassIdentifier: 254 | clientId: GKI2-imrh6y3gG8qNoUkpsb67OANRw-7lGegGQ9UcwaNFdrKaRrpcXEjF7hWmAQrfjs 255 | clientSecret: qYUyBeiKKEETqHtjWFwaVvJnwsWbWySI 256 | accountNamespaceName: Lottery-Account 257 | lotteryNamespaceName: Lottery 258 | inventoryNamespaceName: Lottery-Inventory 259 | inventoryName: Bag 260 | exchangeNamespaceName: Lottery-Exchange 261 | exchangeRateName: Gacha 262 | --- !u!1 &1959892170 263 | GameObject: 264 | m_ObjectHideFlags: 0 265 | m_CorrespondingSourceObject: {fileID: 0} 266 | m_PrefabInstance: {fileID: 0} 267 | m_PrefabAsset: {fileID: 0} 268 | serializedVersion: 6 269 | m_Component: 270 | - component: {fileID: 1959892172} 271 | - component: {fileID: 1959892171} 272 | m_Layer: 0 273 | m_Name: Directional Light 274 | m_TagString: Untagged 275 | m_Icon: {fileID: 0} 276 | m_NavMeshLayer: 0 277 | m_StaticEditorFlags: 0 278 | m_IsActive: 1 279 | --- !u!108 &1959892171 280 | Light: 281 | m_ObjectHideFlags: 0 282 | m_CorrespondingSourceObject: {fileID: 0} 283 | m_PrefabInstance: {fileID: 0} 284 | m_PrefabAsset: {fileID: 0} 285 | m_GameObject: {fileID: 1959892170} 286 | m_Enabled: 1 287 | serializedVersion: 10 288 | m_Type: 1 289 | m_Shape: 0 290 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 291 | m_Intensity: 1 292 | m_Range: 10 293 | m_SpotAngle: 30 294 | m_InnerSpotAngle: 21.80208 295 | m_CookieSize: 10 296 | m_Shadows: 297 | m_Type: 2 298 | m_Resolution: -1 299 | m_CustomResolution: -1 300 | m_Strength: 1 301 | m_Bias: 0.05 302 | m_NormalBias: 0.4 303 | m_NearPlane: 0.2 304 | m_CullingMatrixOverride: 305 | e00: 1 306 | e01: 0 307 | e02: 0 308 | e03: 0 309 | e10: 0 310 | e11: 1 311 | e12: 0 312 | e13: 0 313 | e20: 0 314 | e21: 0 315 | e22: 1 316 | e23: 0 317 | e30: 0 318 | e31: 0 319 | e32: 0 320 | e33: 1 321 | m_UseCullingMatrixOverride: 0 322 | m_Cookie: {fileID: 0} 323 | m_DrawHalo: 0 324 | m_Flare: {fileID: 0} 325 | m_RenderMode: 0 326 | m_CullingMask: 327 | serializedVersion: 2 328 | m_Bits: 4294967295 329 | m_RenderingLayerMask: 1 330 | m_Lightmapping: 4 331 | m_LightShadowCasterMode: 0 332 | m_AreaSize: {x: 1, y: 1} 333 | m_BounceIntensity: 1 334 | m_ColorTemperature: 6570 335 | m_UseColorTemperature: 0 336 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 337 | m_UseBoundingSphereOverride: 0 338 | m_UseViewFrustumForShadowCasterCull: 1 339 | m_ShadowRadius: 0 340 | m_ShadowAngle: 0 341 | --- !u!4 &1959892172 342 | Transform: 343 | m_ObjectHideFlags: 0 344 | m_CorrespondingSourceObject: {fileID: 0} 345 | m_PrefabInstance: {fileID: 0} 346 | m_PrefabAsset: {fileID: 0} 347 | m_GameObject: {fileID: 1959892170} 348 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 349 | m_LocalPosition: {x: 0, y: 3, z: 0} 350 | m_LocalScale: {x: 1, y: 1, z: 1} 351 | m_ConstrainProportionsScale: 0 352 | m_Children: [] 353 | m_Father: {fileID: 0} 354 | m_RootOrder: 1 355 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 356 | --------------------------------------------------------------------------------