Структуры

This commit is contained in:
ThomasCharester committed 2026-02-26 13:19:15 +03:00
1 parent 06b08f1efe
commit 1b578067f3
82 files changed
+2692 -944

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7dbf51973acd79342811956d53d4f199
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,121 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 468a46d0ae32c3544b7d98094e6448a9, type: 3}
m_Name: AddressableAssetSettings
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetSettings
m_DefaultGroup: 61413ea24ac5d754f9bfe1eff712957a
m_currentHash:
serializedVersion: 2
Hash: cbf960f9f88de008b8321897911b184c
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0
m_DisableCatalogUpdateOnStart: 0
m_InternalIdNamingMode: 0
m_InternalBundleIdMode: 1
m_AssetLoadMode: 0
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_AssetBundleProviderType:
m_AssemblyName:
m_ClassName:
m_IgnoreUnsupportedFilesInBuild: 0
m_UniqueBundleIds: 0
m_EnableJsonCatalog: 0
m_NonRecursiveBuilding: 1
m_AllowNestedBundleFolders: 0
m_CCDEnabled: 0
m_maxConcurrentWebRequests: 3
m_UseUWRForLocalBundles: 0
m_BundleTimeout: 0
m_BundleRetryCount: 0
m_BundleRedirectLimit: -1
m_SharedBundleSettings: 0
m_SharedBundleSettingsCustomGroupIndex: 0
m_simulatedLoadDelay: 0.1
m_ContiguousBundles: 1
m_StripUnityVersionFromBundleBuild: 0
m_DisableVisibleSubAssetRepresentations: 0
m_BuiltInBundleNaming: 0
mBuiltInBundleCustomNaming:
m_MonoScriptBundleNaming: 0
m_CheckForContentUpdateRestrictionsOption: 0
m_MonoScriptBundleCustomNaming:
m_RemoteCatalogBuildPath:
m_Id:
m_RemoteCatalogLoadPath:
m_Id:
m_ContentStateBuildPathProfileVariableName:
m_CustomContentStateBuildPath:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 0
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
m_GroupAssets:
- {fileID: 11400000, guid: 0b54ca7e3c1f10c4aa8c629911d21407, type: 2}
m_BuildSettings:
m_LogResourceManagerExceptions: 1
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
m_ProfileSettings:
m_Profiles:
- m_InheritedParent:
m_Id: ef3cbfe13b0a7fd41b27467a106568be
m_ProfileName: Default
m_Values:
- m_Id: 1340b70ab1d52f8479833e8f0a9cafde
m_Value: 'ServerData/[BuildTarget]'
- m_Id: 2aaf0e1e4cb77d542bd161d82008c891
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: 43b77d74af9beab45ae5d41d29ac0cd4
m_Value: <undefined>
- m_Id: 680c997045764e447b878f1e5b95e18f
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: e3620fb388c9f7a40985fd8cc363aa36
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
m_ProfileEntryNames:
- m_Id: 1340b70ab1d52f8479833e8f0a9cafde
m_Name: Remote.BuildPath
m_InlineUsage: 0
- m_Id: 2aaf0e1e4cb77d542bd161d82008c891
m_Name: Local.BuildPath
m_InlineUsage: 0
- m_Id: 43b77d74af9beab45ae5d41d29ac0cd4
m_Name: Remote.LoadPath
m_InlineUsage: 0
- m_Id: 680c997045764e447b878f1e5b95e18f
m_Name: BuildTarget
m_InlineUsage: 0
- m_Id: e3620fb388c9f7a40985fd8cc363aa36
m_Name: Local.LoadPath
m_InlineUsage: 0
m_ProfileVersion: 1
m_LabelTable:
m_LabelNames:
- default
- AudioSettingsConfig
- AudioInfoConfig
- UIPanelConfig
- SceneConfig
- LayerMaskConfig
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: 73eda305665711b4cafd86da588a0749, type: 2}
m_InitializationObjects: []
m_CertificateHandlerType:
m_AssemblyName:
m_ClassName:
m_ActivePlayerDataBuilderIndex: 2
m_DataBuilders:
- {fileID: 11400000, guid: c70649c57ca44ee4ea4385d9512ba0f1, type: 2}
- {fileID: 11400000, guid: 1d285e998ac65cc478b5b01920b37aba, type: 2}
- {fileID: 11400000, guid: d714cf688eefdfb45b9d432a28e4458c, type: 2}
m_ActiveProfileId: ef3cbfe13b0a7fd41b27467a106568be
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 98a60ee5f4a8add4b85833d6a400e8b9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 66e2ad62aa7087a4d9e31210ef9b99bc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,79 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2676213784644493915
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 0}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id:
m_LoadPath:
m_Id:
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName:
m_ClassName:
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3}
m_Name: Packed Assets
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroupTemplate
m_SchemaObjects:
- {fileID: -2676213784644493915}
- {fileID: 2339472115359725477}
m_Description: Pack assets into asset bundles.
m_Settings: {fileID: 11400000, guid: 98a60ee5f4a8add4b85833d6a400e8b9, type: 2}
--- !u!114 &2339472115359725477
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 0}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 73eda305665711b4cafd86da588a0749
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f3821ca8f63df4b4981de92e29c888c3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,65 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Default Local Group
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.AddressableAssetGroup
m_GroupName: Default Local Group
m_GUID: 61413ea24ac5d754f9bfe1eff712957a
m_SerializeEntries:
- m_GUID: 17c5e56eb6c99db40b6093c9d543bb4f
m_Address: Assets/Resources_moved/Configs/UI/CanvasSettingsConfig.asset
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2471ee3760db4ecfe8c313bb2c00daf0
m_Address: Assets/Resources_moved/Configs/Audio/Audio Source.prefab
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2bcd2660ca9b64942af0de543d8d7100
m_Address: Assets/InputSystem_Actions.inputactions
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4bf97e6c7f046f849912182e4ded6c9e
m_Address: Assets/Resources_moved/Configs/Audio/Settings/Full3D.asset
m_ReadOnly: 0
m_SerializedLabels:
- AudioSettingsConfig
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d7dd69cfadda3d6e18ec390724be0d80
m_Address: Assets/Resources_moved/Configs/Audio/AudioSourcePrefabConfig.asset
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: e1fbe5b2798657342b569f723d16c9de
m_Address: Assets/Resources_moved/UI/Canvas.prefab
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: eab71c0cf90c4b94294e497d3734cfe1
m_Address: Assets/Resources_moved/Configs/InputServiceConfig.asset
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: ec0362c4c0d045cccbe89aee2231c3be
m_Address: Assets/Resources_moved/Configs/Audio/Settings/NoBlend.asset
m_ReadOnly: 0
m_SerializedLabels:
- AudioSettingsConfig
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 98a60ee5f4a8add4b85833d6a400e8b9, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: b840758b9c4900944bbca06c0e9dcdbc, type: 2}
- {fileID: 11400000, guid: 8b288d3dcf7d03941be7bd165daced89, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0b54ca7e3c1f10c4aa8c629911d21407
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6017328ab48507a499ac9939549cb044
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Default Local Group_BundledAssetGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.BundledAssetGroupSchema
m_Group: {fileID: 11400000, guid: 0b54ca7e3c1f10c4aa8c629911d21407, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 2aaf0e1e4cb77d542bd161d82008c891
m_LoadPath:
m_Id: e3620fb388c9f7a40985fd8cc363aa36
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b840758b9c4900944bbca06c0e9dcdbc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Default Local Group_ContentUpdateGroupSchema
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.ContentUpdateGroupSchema
m_Group: {fileID: 11400000, guid: 0b54ca7e3c1f10c4aa8c629911d21407, type: 2}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8b288d3dcf7d03941be7bd165daced89
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 67562c706ac0b6644a863e0537d31357
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 88d21199f5d473f4db36845f2318f180, type: 3}
m_Name: BuildScriptFastMode
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptFastMode
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c70649c57ca44ee4ea4385d9512ba0f1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3}
m_Name: BuildScriptPackedMode
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d714cf688eefdfb45b9d432a28e4458c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3}
m_Name: BuildScriptPackedPlayMode
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedPlayMode
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1d285e998ac65cc478b5b01920b37aba
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a189bb168d8d90478a09ea08c2f3d72, type: 3}
m_Name: DefaultObject
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject
m_AddressableAssetSettingsGuid: 98a60ee5f4a8add4b85833d6a400e8b9
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 149da3fe95eb9ef4ebb11d520d55cb81
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 14e2378107474634a7cef1a78de2bad1
timeCreated: 1772098281
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 05301ce17b624f25af29ec9e408dcef6
timeCreated: 1772098338
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace Code.Calendar.DataStructures
{
public struct Plant
{
public string Name;
public string IconPath;
public int Id;
}
public struct Task
{
public string Description;
public DateTime Date;
public bool IsPeriodic;
public int PeriodicInterval;
public int PlantId;
public List<string> PhotoPaths;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bde98849445a4c769f5c1cf41e561f87
timeCreated: 1772098360
@@ -1,5 +1,4 @@
using Code.Infrastructure.Audio;
using Code.Infrastructure.Camera;
using Code.Infrastructure.Input;
using Code.Infrastructure.UI;
using Reflex.Attributes;
@@ -17,8 +16,6 @@ namespace Code.Infrastructure.App
public class AppStateMachineContext
{
[Inject] public SceneLoader.SceneLoader SceneLoader { get; set; }
[Inject] public CameraStateMachine Camera { get; set; }
[Inject] public CameraFactory CameraFactory { get; set; }
[Inject] public IUIService UIService { get; set; }
[Inject] public IAudioFactory AudioFactory { get; set; }
[Inject] public IAudioService AudioService { get; set; }
@@ -1,16 +1,12 @@
using Code.Debug;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Camera;
using Code.Infrastructure.Configs;
using Code.Infrastructure.Input;
using Code.Infrastructure.Loadings;
using Code.Infrastructure.SceneLoader;
using Code.Infrastructure.UI;
using Code.Infrastructure.Volume;
using Reflex.Core;
using Reflex.Enums;
using Reflex.Injectors;
using Unity.Cinemachine;
using UnityEngine;
using UnityEngine.Rendering.Universal;
using Resolution = Reflex.Enums.Resolution;
@@ -20,14 +16,10 @@ namespace Code.Infrastructure.App
public class PapaInstaller : MonoBehaviour, IInstaller,
ISceneConfigsLoadedHandle,
IInputServiceInitializedHandle,
ICameraInitializedHandle,
IUIInitializedHandle,
IUIPanelLoaded,
IVolumesInitializedHandle,
IVolumeLoaded,
IAudioSourcePoolInitializedHandle,
IAudioConfigsLoadedHandle,
ICinematicMachineHandle,
ILayerMasksInitializedHandle
{
public void InstallBindings(ContainerBuilder containerBuilder)
@@ -46,19 +38,11 @@ namespace Code.Infrastructure.App
containerBuilder.RegisterType(typeof(AppStateMachine), Lifetime.Singleton, Resolution.Lazy);
containerBuilder.RegisterType(typeof(AppStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
containerBuilder.RegisterType(typeof(CameraFactory), Lifetime.Singleton, Resolution.Lazy);
containerBuilder.RegisterType(typeof(CameraStateMachine), Lifetime.Singleton, Resolution.Lazy);
containerBuilder.RegisterType(typeof(CameraStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
containerBuilder.RegisterType(typeof(UIFactory), new[] { typeof(IUIFactory) }, Lifetime.Singleton,
Resolution.Eager);
containerBuilder.RegisterType(typeof(UIService), new[] { typeof(IUIService) }, Lifetime.Singleton,
Resolution.Eager);
containerBuilder.RegisterType(typeof(VolumeService), new[] { typeof(IVolumeService) }, Lifetime.Singleton,
Resolution.Lazy);
containerBuilder.RegisterType(typeof(VolumeFactory), new[] { typeof(IVolumeFactory) }, Lifetime.Singleton,
Resolution.Eager);
containerBuilder.RegisterType(typeof(AudioFactory), new[] { typeof(IAudioFactory) }, Lifetime.Singleton,
Resolution.Eager);
@@ -74,26 +58,14 @@ namespace Code.Infrastructure.App
// Logo
// Scene configs
// Input service
// Camera
// Volume Factory
// Loading volume
// Audio Factory
// Audio Pool
// Cinemachine Camera
// Layer masks
_initialLoading = new Loading(11, () => EssentialLoadEnded(_thatRightContainer));
_initialLoading = new Loading(7, () => EssentialLoadEnded(_thatRightContainer));
_ui2CamLoading = new Loading(2,
() =>
{
_thatRightContainer.Resolve<IUIService>().SetCanvasCamera(_thatRightContainer
.Resolve<CameraStateMachineContext>().cameraLoadedData.Camera);
});
}
private Loading _initialLoading;
private Loading _ui2CamLoading;
private Container _thatRightContainer;
private void Bootstrap(Container container)
@@ -104,9 +76,6 @@ namespace Code.Infrastructure.App
ConstructorInjector.Construct(typeof(LayerMasks), container);
var cameraFactory = container.Resolve<CameraFactory>();
cameraFactory.CreateCameraStateMachine(container.Resolve<CameraStateMachine>())
.Forget();
}
private void EssentialLoadEnded(Container container)
@@ -128,24 +97,9 @@ namespace Code.Infrastructure.App
_initialLoading.DoProgress();
}
public void CameraInitialized(CameraStateMachineContext.CameraLoadedData data)
{
_thatRightContainer.Resolve<CameraStateMachineContext>().cameraLoadedData = data;
_thatRightContainer.Resolve<CameraStateMachine>().SwitchState(CameraMode.None)
.AllowStateTransition(CameraMode.ThirdPerson)
.AllowStateTransition(CameraMode.Platformer);
data.Camera.GetUniversalAdditionalCameraData().renderPostProcessing = true;
_ui2CamLoading.DoProgress();
_initialLoading.DoProgress();
_thatRightContainer.Resolve<CameraFactory>().LoadCinemachineCamera(CameraMode.None).Forget();
}
public void UIInitialized()
{
_ui2CamLoading.DoProgress();
_initialLoading.DoProgress();
_thatRightContainer.Resolve<IUIService>().TryLoadPanel(UIPanelType.Logo);
@@ -170,26 +124,6 @@ namespace Code.Infrastructure.App
}
}
public void VolumesInitialized()
{
_initialLoading.DoProgress();
_thatRightContainer.Resolve<IVolumeService>().TryLoadVolume(VolumeId.MenuRetro);
}
public void VolumeLoaded(VolumeId volumeId)
{
switch (volumeId)
{
case VolumeId.MenuRetro:
_initialLoading.DoProgress();
break;
default:
Application.Quit();
break;
}
}
public void AudioSourcePoolInitialized()
{
_initialLoading.DoProgress();
@@ -200,11 +134,6 @@ namespace Code.Infrastructure.App
_initialLoading.DoProgress();
}
public void CinemachineLoaded(CinemachineCamera cinemachineCamera)
{
_initialLoading.DoProgress();
}
public void LayerMasksInitialized()
{
_initialLoading.DoProgress();
@@ -1,5 +1,4 @@
using System.Threading;
using Code.Debug;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Generators;
using Code.Infrastructure.UI;
@@ -23,26 +22,24 @@ namespace Code.Infrastructure.App.States
Context.UIService.TryRemovePanel(UIPanelType.Logo);
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
// Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
}
protected override void OnExitState()
{
// Context.AudioFactory.ReleaseAudios(AudioNames.UISounds);
Context.UIService.TryRemovePanel(UIPanelType.DebugSceneChooser);
_eventBus.Unsubscribe(this);
}
public void UILoaded(UIPanelType uiPanelType)
{
if (uiPanelType != UIPanelType.DebugSceneChooser) return;
Context.UIService.OpenPanel(uiPanelType);
// if (uiPanelType != UIPanelType.DebugSceneChooser) return;
//
// Context.UIService.OpenPanel(uiPanelType);
}
public void OnReadyToPlay(AudioNames groupName)
{
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
// Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
}
}
}
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Code.Infrastructure.Configs;
using Code.Infrastructure.EventBus;
using Cysharp.Threading.Tasks;
@@ -2,7 +2,6 @@ namespace Code.Infrastructure.Audio
{
public enum AudioNames
{
UISounds,
EnemySFX
UISounds
}
}
@@ -1,7 +1,7 @@
namespace Code.Infrastructure.Configs
{
// Если забыл, это енам масок, пиши тип и -=-=- конфиги
public enum LayerMaskType
{
PlatformerGround
}
}
@@ -2,15 +2,9 @@ namespace Code.Infrastructure.Input
{
public enum ActionMappings
{
MainMenu,
Gameplay,
MainMenu,
Debug
}
public enum GameplayActions
{
Move,
Brake,
}
public enum DebugActions
{
Debug1,
@@ -5,9 +5,6 @@ namespace Code.Infrastructure.SceneLoader
[SceneIdEnum]
public enum SceneId
{
MainMenu,
Gameplay,
SoundTest,
Platformer
MainMenu
}
}
+1 -8
View File
@@ -3,13 +3,6 @@ namespace Code.Infrastructure.UI
public enum UIPanelType
{
Logo,
Loading,
DebugSceneChooser,
// Race
PlayerScoreCounter,
WinScreen,
PlayerScores,
//
DebugMenu
Loading
}
}
+41 -475
View File
@@ -1,482 +1,9 @@
{
"version": 1,
"name": "InputSystem_Actions",
"maps": [
{
"name": "Player",
"id": "df70fa95-8a34-4494-b137-73ab6b9c7d37",
"actions": [
{
"name": "Move",
"type": "Value",
"id": "351f2ccd-1f9f-44bf-9bec-d62ac5c5f408",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Look",
"type": "Value",
"id": "6b444451-8a00-4d00-a97e-f47457f736a8",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "Attack",
"type": "Button",
"id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Interact",
"type": "Button",
"id": "852140f2-7766-474d-8707-702459ba45f3",
"expectedControlType": "Button",
"processors": "",
"interactions": "Hold",
"initialStateCheck": false
},
{
"name": "Crouch",
"type": "Button",
"id": "27c5f898-bc57-4ee1-8800-db469aca5fe3",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Jump",
"type": "Button",
"id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Previous",
"type": "Button",
"id": "2776c80d-3c14-4091-8c56-d04ced07a2b0",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Next",
"type": "Button",
"id": "b7230bb6-fc9b-4f52-8b25-f5e19cb2c2ba",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Sprint",
"type": "Button",
"id": "641cd816-40e6-41b4-8c3d-04687c349290",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "978bfe49-cc26-4a3d-ab7b-7d7a29327403",
"path": "<Gamepad>/leftStick",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "WASD",
"id": "00ca640b-d935-4593-8157-c05846ea39b3",
"path": "Dpad",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "e2062cb9-1b15-46a2-838c-2f8d72a0bdd9",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "up",
"id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "320bffee-a40b-4347-ac70-c210eb8bc73a",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "2e46982e-44cc-431b-9f0b-c11910bf467a",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "77bff152-3580-4b21-b6de-dcd0c7e41164",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8",
"path": "<XRController>/{Primary2DAxis}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3ea4d645-4504-4529-b061-ab81934c3752",
"path": "<Joystick>/stick",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Move",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "c1f7a91b-d0fd-4a62-997e-7fb9b69bf235",
"path": "<Gamepad>/rightStick",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8c8e490b-c610-4785-884f-f04217b23ca4",
"path": "<Pointer>/delta",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse;Touch",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "3e5f5442-8668-4b27-a940-df99bad7e831",
"path": "<Joystick>/{Hatswitch}",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Look",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91",
"path": "<Gamepad>/buttonWest",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "05f6913d-c316-48b2-a6bb-e225f14c7960",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "886e731e-7071-4ae4-95c0-e61739dad6fd",
"path": "<Touchscreen>/primaryTouch/tap",
"interactions": "",
"processors": "",
"groups": ";Touch",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54",
"path": "<Joystick>/trigger",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8255d333-5683-4943-a58a-ccb207ff1dce",
"path": "<XRController>/{PrimaryAction}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7",
"path": "<Keyboard>/enter",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed",
"path": "<Keyboard>/2",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "e15ca19d-e649-4852-97d5-7fe8ccc44e94",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Next",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f2e9ba44-c423-42a7-ad56-f20975884794",
"path": "<Keyboard>/leftShift",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8cbb2f4b-a784-49cc-8d5e-c010b8c7f4e6",
"path": "<Gamepad>/leftStickPress",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d8bf24bf-3f2f-4160-a97c-38ec1eb520ba",
"path": "<XRController>/trigger",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Sprint",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "eb40bb66-4559-4dfa-9a2f-820438abb426",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "daba33a1-ad0c-4742-a909-43ad1cdfbeb6",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "603f3daf-40bd-4854-8724-93e8017f59e3",
"path": "<XRController>/secondaryButton",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1534dc16-a6aa-499d-9c3a-22b47347b52a",
"path": "<Keyboard>/1",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Previous",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "25060bbd-a3a6-476e-8fba-45ae484aad05",
"path": "<Gamepad>/dpad/left",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Previous",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "1c04ea5f-b012-41d1-a6f7-02e963b52893",
"path": "<Keyboard>/e",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3f66d0b-7751-423f-908b-a11c5bd95930",
"path": "<Gamepad>/buttonNorth",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4f4649ac-64a8-4a73-af11-b3faef356a4d",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "36e52cba-0905-478e-a818-f4bfcb9f3b9a",
"path": "<Keyboard>/c",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "UI",
"name": "UI2",
"id": "272f6d14-89ba-496f-b7ff-215263d3219f",
"actions": [
{
@@ -990,6 +517,45 @@
"isPartOfComposite": false
}
]
},
{
"name": "UI",
"id": "25ff9d37-6575-4d06-b0fb-2de5f3f1d702",
"actions": [
{
"name": "Tap",
"type": "Button",
"id": "c4df1467-275d-44ef-bc1c-a8ad2ee5680e",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "364ed97d-5297-46da-bdfe-d0f6f4e1d1d2",
"path": "",
"interactions": "",
"processors": "",
"groups": "",
"action": "Tap",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "953277fe-14f7-4bcd-aeb2-43baf49f2ad0",
"path": "",
"interactions": "",
"processors": "",
"groups": "",
"action": "Tap",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": [
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: fbefdb800f5c8e4468bf456469caaf61
folderAsset: yes
timeCreated: 1596983915
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e5c273c78eb8ebb47a9c6005d4041d73
folderAsset: yes
timeCreated: 1596971200
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,52 @@
#if UNITY_EDITOR || UNITY_ANDROID
using System;
using UnityEngine;
namespace NativeFilePickerNamespace
{
public class FPCallbackHelper : MonoBehaviour
{
private bool autoDestroyWithCallback;
private Action mainThreadAction = null;
public static FPCallbackHelper Create( bool autoDestroyWithCallback )
{
FPCallbackHelper result = new GameObject( "FPCallbackHelper" ).AddComponent<FPCallbackHelper>();
result.autoDestroyWithCallback = autoDestroyWithCallback;
DontDestroyOnLoad( result.gameObject );
return result;
}
public void CallOnMainThread( Action function )
{
lock( this )
{
mainThreadAction += function;
}
}
private void Update()
{
if( mainThreadAction != null )
{
try
{
Action temp;
lock( this )
{
temp = mainThreadAction;
mainThreadAction = null;
}
temp();
}
finally
{
if( autoDestroyWithCallback )
Destroy( gameObject );
}
}
}
}
}
#endif
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 41423473566db0b4ebd62882996f08bc
timeCreated: 1596973837
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Android/FPCallbackHelper.cs
uploadId: 757770
@@ -0,0 +1,24 @@
#if UNITY_EDITOR || UNITY_ANDROID
using UnityEngine;
namespace NativeFilePickerNamespace
{
public class FPPermissionCallbackAndroid : AndroidJavaProxy
{
private readonly NativeFilePicker.PermissionCallback callback;
private readonly FPCallbackHelper callbackHelper;
public FPPermissionCallbackAndroid( NativeFilePicker.PermissionCallback callback ) : base( "com.yasirkula.unity.NativeFilePickerPermissionReceiver" )
{
this.callback = callback;
callbackHelper = FPCallbackHelper.Create( true );
}
[UnityEngine.Scripting.Preserve]
public void OnPermissionResult( int result )
{
callbackHelper.CallOnMainThread( () => callback( (NativeFilePicker.Permission) result ) );
}
}
}
#endif
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 5f8c2de0178a90140b030975551436a5
timeCreated: 1596973837
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Android/FPPermissionCallbackAndroid.cs
uploadId: 757770
@@ -0,0 +1,71 @@
#if UNITY_EDITOR || UNITY_ANDROID
using UnityEngine;
namespace NativeFilePickerNamespace
{
public class FPResultCallbackAndroid : AndroidJavaProxy
{
private readonly NativeFilePicker.FilePickedCallback pickCallback;
private readonly NativeFilePicker.MultipleFilesPickedCallback pickCallbackMultiple;
private readonly NativeFilePicker.FilesExportedCallback exportCallback;
private readonly FPCallbackHelper callbackHelper;
public FPResultCallbackAndroid( NativeFilePicker.FilePickedCallback pickCallback, NativeFilePicker.MultipleFilesPickedCallback pickCallbackMultiple, NativeFilePicker.FilesExportedCallback exportCallback ) : base( "com.yasirkula.unity.NativeFilePickerResultReceiver" )
{
this.pickCallback = pickCallback;
this.pickCallbackMultiple = pickCallbackMultiple;
this.exportCallback = exportCallback;
callbackHelper = FPCallbackHelper.Create( true );
}
[UnityEngine.Scripting.Preserve]
public void OnFilePicked( string path )
{
callbackHelper.CallOnMainThread( () => pickCallback( !string.IsNullOrEmpty( path ) ? path : null ) );
}
[UnityEngine.Scripting.Preserve]
public void OnMultipleFilesPicked( string paths )
{
string[] result = null;
if( !string.IsNullOrEmpty( paths ) )
{
string[] pathsSplit = paths.Split( '>' );
int validPathCount = 0;
for( int i = 0; i < pathsSplit.Length; i++ )
{
if( !string.IsNullOrEmpty( pathsSplit[i] ) )
validPathCount++;
}
if( validPathCount == 0 )
pathsSplit = new string[0];
else if( validPathCount != pathsSplit.Length )
{
string[] validPaths = new string[validPathCount];
for( int i = 0, j = 0; i < pathsSplit.Length; i++ )
{
if( !string.IsNullOrEmpty( pathsSplit[i] ) )
validPaths[j++] = pathsSplit[i];
}
pathsSplit = validPaths;
}
result = pathsSplit;
}
callbackHelper.CallOnMainThread( () => pickCallbackMultiple( ( result != null && result.Length > 0 ) ? result : null ) );
}
[UnityEngine.Scripting.Preserve]
public void OnFilesExported( bool result )
{
callbackHelper.CallOnMainThread( () => exportCallback( result ) );
}
}
}
#endif
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: f43d316f7eb1cdf4abcf327a1fbc025b
timeCreated: 1596973837
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Android/FPResultCallbackAndroid.cs
uploadId: 757770
@@ -0,0 +1,40 @@
fileFormatVersion: 2
guid: 3ed817dcf924721488f9672995f51cb3
timeCreated: 1607368610
licenseType: Store
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings: {}
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Android/NativeFilePicker.aar
uploadId: 757770
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f387670006405804d9b5c216ebd8ab1f
folderAsset: yes
timeCreated: 1521452097
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,15 @@
{
"name": "NativeFilePicker.Editor",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 31a0463be93a160428f78ae484a99f5b
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Editor/NativeFilePicker.Editor.asmdef
uploadId: 757770
@@ -0,0 +1,65 @@
using System.IO;
using UnityEditor;
using UnityEngine;
namespace NativeFilePickerNamespace
{
[HelpURL( "https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html" )]
public class NativeFilePickerCustomTypes : ScriptableObject
{
[System.Serializable]
public class TypeHolder
{
[Tooltip( "A unique identifier for the type (UTI) (e.g. com.mycompany.mydata)" )]
public string identifier;
[Tooltip( "Description of the type (e.g. Save data for My App)" )]
public string description;
[Tooltip( "If this type is owned by your app (i.e. exclusive to your app), set this value to true. If another app generates files of this type and your app is merely importing/modifying them, set this value to false." )]
public bool isExported;
[Tooltip( "Which official UTI(s) is this type part of (e.g. public.data for generic types or public.image for image types)\nFull list available at: https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html" )]
public string[] conformsTo;
[Tooltip( "Extension(s) associated with this type (don't include the period; i.e. use myextension instead of .myextension)" )]
public string[] extensions;
}
private const string INITIAL_SAVE_PATH = "Assets/Plugins/NativeFilePicker/NativeFilePickerCustomTypes.asset";
#pragma warning disable 0649
[SerializeField]
private TypeHolder[] customTypes;
#pragma warning restore 0649
[MenuItem( "Window/NativeFilePicker Custom Types" )]
private static void InspectCustomTypes()
{
Selection.activeObject = GetInstance( true );
}
private static NativeFilePickerCustomTypes GetInstance( bool createIfNotExists )
{
NativeFilePickerCustomTypes instance = null;
string[] instances = AssetDatabase.FindAssets( "t:NativeFilePickerCustomTypes" );
if( instances != null && instances.Length > 0 )
instance = AssetDatabase.LoadAssetAtPath<NativeFilePickerCustomTypes>( AssetDatabase.GUIDToAssetPath( instances[0] ) );
if( !instance && createIfNotExists )
{
Directory.CreateDirectory( Path.GetDirectoryName( INITIAL_SAVE_PATH ) );
AssetDatabase.CreateAsset( CreateInstance<NativeFilePickerCustomTypes>(), INITIAL_SAVE_PATH );
AssetDatabase.SaveAssets();
instance = AssetDatabase.LoadAssetAtPath<NativeFilePickerCustomTypes>( INITIAL_SAVE_PATH );
Debug.Log( "Created NativeFilePickerCustomTypes file at " + INITIAL_SAVE_PATH + ". You can move this file around freely.", instance );
}
return instance;
}
public static TypeHolder[] GetCustomTypes()
{
NativeFilePickerCustomTypes instance = GetInstance( false );
return instance ? instance.customTypes : null;
}
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: f281670325986984c95fde82c23195e0
timeCreated: 1592237398
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Editor/NativeFilePickerCustomTypes.cs
uploadId: 757770
@@ -0,0 +1,199 @@
using System.IO;
using UnityEditor;
using UnityEngine;
#if UNITY_IOS
using System.Collections.Generic;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
#endif
namespace NativeFilePickerNamespace
{
[System.Serializable]
public class Settings
{
private const string SAVE_PATH = "ProjectSettings/NativeFilePicker.json";
public bool AutoSetupFrameworks = true;
public bool AutoSetupiCloud = false;
private static Settings m_instance = null;
public static Settings Instance
{
get
{
if( m_instance == null )
{
try
{
if( File.Exists( SAVE_PATH ) )
m_instance = JsonUtility.FromJson<Settings>( File.ReadAllText( SAVE_PATH ) );
else
m_instance = new Settings();
}
catch( System.Exception e )
{
Debug.LogException( e );
m_instance = new Settings();
}
}
return m_instance;
}
}
public void Save()
{
File.WriteAllText( SAVE_PATH, JsonUtility.ToJson( this, true ) );
}
[SettingsProvider]
public static SettingsProvider CreatePreferencesGUI()
{
return new SettingsProvider( "Project/yasirkula/Native File Picker", SettingsScope.Project )
{
guiHandler = ( searchContext ) => PreferencesGUI(),
keywords = new System.Collections.Generic.HashSet<string>() { "Native", "File", "Picker", "Android", "iOS" }
};
}
public static void PreferencesGUI()
{
EditorGUI.BeginChangeCheck();
Instance.AutoSetupFrameworks = EditorGUILayout.Toggle( new GUIContent( "Auto Setup Frameworks", "Automatically adds MobileCoreServices and CloudKit frameworks to the generated Xcode project" ), Instance.AutoSetupFrameworks );
Instance.AutoSetupiCloud = EditorGUILayout.Toggle( new GUIContent( "Auto Setup iCloud", "Automatically enables iCloud capability of the generated Xcode project" ), Instance.AutoSetupiCloud );
if( EditorGUI.EndChangeCheck() )
Instance.Save();
}
}
public class NativeFilePickerPostProcessBuild
{
#if UNITY_IOS
#pragma warning disable 0162
[PostProcessBuild]
public static void OnPostprocessBuild( BuildTarget target, string buildPath )
{
// Add declared custom types to Info.plist
if( target == BuildTarget.iOS )
{
NativeFilePickerCustomTypes.TypeHolder[] customTypes = NativeFilePickerCustomTypes.GetCustomTypes();
if( customTypes != null )
{
string plistPath = Path.Combine( buildPath, "Info.plist" );
PlistDocument plist = new PlistDocument();
plist.ReadFromString( File.ReadAllText( plistPath ) );
PlistElementDict rootDict = plist.root;
for( int i = 0; i < customTypes.Length; i++ )
{
NativeFilePickerCustomTypes.TypeHolder customType = customTypes[i];
PlistElementArray customTypesArray = GetCustomTypesArray( rootDict, customType.isExported );
// Don't allow duplicate entries
RemoveCustomTypeIfExists( customTypesArray, customType.identifier );
PlistElementDict customTypeDict = customTypesArray.AddDict();
customTypeDict.SetString( "UTTypeIdentifier", customType.identifier );
customTypeDict.SetString( "UTTypeDescription", customType.description );
PlistElementArray conformsTo = customTypeDict.CreateArray( "UTTypeConformsTo" );
for( int j = 0; j < customType.conformsTo.Length; j++ )
conformsTo.AddString( customType.conformsTo[j] );
PlistElementDict tagSpecification = customTypeDict.CreateDict( "UTTypeTagSpecification" );
PlistElementArray tagExtensions = tagSpecification.CreateArray( "public.filename-extension" );
for( int j = 0; j < customType.extensions.Length; j++ )
tagExtensions.AddString( customType.extensions[j] );
}
File.WriteAllText( plistPath, plist.WriteToString() );
}
}
// Rest of the function shouldn't execute unless build post-processing is enabled
if( !Settings.Instance.AutoSetupFrameworks && !Settings.Instance.AutoSetupiCloud )
return;
if( target == BuildTarget.iOS )
{
string pbxProjectPath = PBXProject.GetPBXProjectPath( buildPath );
PBXProject pbxProject = new PBXProject();
pbxProject.ReadFromFile( pbxProjectPath );
string targetGUID = pbxProject.GetUnityFrameworkTargetGuid();
if( Settings.Instance.AutoSetupFrameworks )
{
pbxProject.AddFrameworkToProject( targetGUID, "MobileCoreServices.framework", false );
pbxProject.AddFrameworkToProject( targetGUID, "CloudKit.framework", false );
}
File.WriteAllText( pbxProjectPath, pbxProject.WriteToString() );
if( Settings.Instance.AutoSetupiCloud )
{
ProjectCapabilityManager manager = new ProjectCapabilityManager( pbxProjectPath, "iCloud.entitlements", "Unity-iPhone" );
manager.AddiCloud( false, true, false, true, null );
manager.WriteToFile();
}
}
}
// Adding PRODUCT_BUNDLE_IDENTIFIER if not exists (if another plugin also fills this value, we must not touch it)
[PostProcessBuild( 99 )]
public static void OnPostprocessBuild2( BuildTarget target, string buildPath )
{
if( !Settings.Instance.AutoSetupFrameworks && !Settings.Instance.AutoSetupiCloud )
return;
if( target == BuildTarget.iOS )
{
string pbxProjectPath = PBXProject.GetPBXProjectPath( buildPath );
PBXProject pbxProject = new PBXProject();
pbxProject.ReadFromFile( pbxProjectPath );
string targetGUID = pbxProject.GetUnityFrameworkTargetGuid();
if( string.IsNullOrEmpty( pbxProject.GetBuildPropertyForAnyConfig( targetGUID, "PRODUCT_BUNDLE_IDENTIFIER" ) ) )
pbxProject.AddBuildProperty( targetGUID, "PRODUCT_BUNDLE_IDENTIFIER", PlayerSettings.applicationIdentifier );
File.WriteAllText( pbxProjectPath, pbxProject.WriteToString() );
}
}
private static PlistElementArray GetCustomTypesArray( PlistElementDict rootDict, bool isExported )
{
string key = isExported ? "UTExportedTypeDeclarations" : "UTImportedTypeDeclarations";
PlistElementArray result = rootDict[key] as PlistElementArray;
if( result == null )
result = rootDict.CreateArray( key );
return result;
}
private static void RemoveCustomTypeIfExists( PlistElementArray customTypesArray, string UTI )
{
List<PlistElement> values = customTypesArray.values;
if( values == null )
return;
for( int i = values.Count - 1; i >= 0; i-- )
{
PlistElementDict exportedType = values[i] as PlistElementDict;
if( exportedType != null )
{
PlistElementString exportedTypeID = exportedType["UTTypeIdentifier"] as PlistElementString;
if( exportedTypeID != null && exportedTypeID.value == UTI )
values.RemoveAt( i );
}
}
}
#pragma warning restore 0162
#endif
}
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: d466ecf51c239f9419715f6b59348d6c
timeCreated: 1521452119
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/Editor/NativeFilePickerPostProcessBuild.cs
uploadId: 757770
@@ -0,0 +1,3 @@
{
"name": "NativeFilePicker.Runtime"
}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 250e096504da3aa4f851a4df12262950
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/NativeFilePicker.Runtime.asmdef
uploadId: 757770
@@ -0,0 +1,411 @@
using System;
using System.IO;
using UnityEngine;
using System.Threading.Tasks;
#if UNITY_ANDROID || UNITY_IOS
using NativeFilePickerNamespace;
#endif
public static class NativeFilePicker
{
public delegate void PermissionCallback( Permission permission );
public delegate void FilePickedCallback( string path );
public delegate void MultipleFilesPickedCallback( string[] paths );
public delegate void FilesExportedCallback( bool success );
public enum Permission { Denied = 0, Granted = 1, ShouldAsk = 2 };
#region Platform Specific Elements
#if !UNITY_EDITOR && UNITY_ANDROID
private static AndroidJavaClass m_ajc = null;
private static AndroidJavaClass AJC
{
get
{
if( m_ajc == null )
m_ajc = new AndroidJavaClass( "com.yasirkula.unity.NativeFilePicker" );
return m_ajc;
}
}
private static AndroidJavaObject m_context = null;
private static AndroidJavaObject Context
{
get
{
if( m_context == null )
{
using( AndroidJavaObject unityClass = new AndroidJavaClass( "com.unity3d.player.UnityPlayer" ) )
{
m_context = unityClass.GetStatic<AndroidJavaObject>( "currentActivity" );
}
}
return m_context;
}
}
#elif !UNITY_EDITOR && UNITY_IOS
[System.Runtime.InteropServices.DllImport( "__Internal" )]
private static extern int _NativeFilePicker_CanPickMultipleFiles();
[System.Runtime.InteropServices.DllImport( "__Internal" )]
private static extern string _NativeFilePicker_ConvertExtensionToUTI( string extension );
[System.Runtime.InteropServices.DllImport( "__Internal" )]
private static extern void _NativeFilePicker_PickFile( string[] UTIs, int UTIsCount );
[System.Runtime.InteropServices.DllImport( "__Internal" )]
private static extern void _NativeFilePicker_PickMultipleFiles( string[] UTIs, int UTIsCount );
[System.Runtime.InteropServices.DllImport( "__Internal" )]
private static extern void _NativeFilePicker_ExportFiles( string[] files, int filesCount );
#endif
#endregion
#if !UNITY_EDITOR && UNITY_ANDROID
private static string m_selectedFilePath = null;
private static string SelectedFilePath
{
get
{
if( m_selectedFilePath == null )
{
m_selectedFilePath = Path.Combine( Application.temporaryCachePath, "pickedFile" );
Directory.CreateDirectory( Application.temporaryCachePath );
}
return m_selectedFilePath;
}
}
#endif
#region Runtime Permissions
public static bool CheckPermission( bool readPermissionOnly = false )
{
#if !UNITY_EDITOR && UNITY_ANDROID
return AJC.CallStatic<int>( "CheckPermission", Context, readPermissionOnly ) == 1;
#else
return true;
#endif
}
public static void RequestPermissionAsync( PermissionCallback callback, bool readPermissionOnly = false )
{
#if !UNITY_EDITOR && UNITY_ANDROID
FPPermissionCallbackAndroid nativeCallback = new( callback );
AJC.CallStatic( "RequestPermission", Context, nativeCallback, readPermissionOnly );
#else
callback( Permission.Granted );
#endif
}
public static Task<Permission> RequestPermissionAsync( bool readPermissionOnly = false )
{
TaskCompletionSource<Permission> tcs = new TaskCompletionSource<Permission>();
RequestPermissionAsync( ( permission ) => tcs.SetResult( permission ), readPermissionOnly );
return tcs.Task;
}
public static void OpenSettings()
{
#if !UNITY_EDITOR && UNITY_ANDROID
AJC.CallStatic( "OpenSettings", Context );
#endif
}
#endregion
#region Helper Functions
public static bool CanPickMultipleFiles()
{
#if !UNITY_EDITOR && UNITY_ANDROID
return AJC.CallStatic<bool>( "CanPickMultipleFiles" );
#elif !UNITY_EDITOR && UNITY_IOS
return _NativeFilePicker_CanPickMultipleFiles() == 1;
#else
return false;
#endif
}
public static bool CanExportFiles()
{
#if UNITY_EDITOR
return true;
#elif UNITY_ANDROID
return AJC.CallStatic<bool>( "CanExportFiles" );
#elif UNITY_IOS
return true;
#else
return false;
#endif
}
public static bool CanExportMultipleFiles()
{
#if UNITY_EDITOR
return true;
#elif UNITY_ANDROID
return AJC.CallStatic<bool>( "CanExportMultipleFiles" );
#elif UNITY_IOS
return _NativeFilePicker_CanPickMultipleFiles() == 1;
#else
return false;
#endif
}
public static bool IsFilePickerBusy()
{
#if !UNITY_EDITOR && UNITY_IOS
return FPResultCallbackiOS.IsBusy;
#else
return false;
#endif
}
public static string ConvertExtensionToFileType( string extension )
{
if( string.IsNullOrEmpty( extension ) )
return null;
if( extension.IndexOf( '*' ) >= 0 )
{
// So many users try to do this that it's now necessary to throw an exception for this particular scenario
throw new ArgumentException( "See: https://github.com/yasirkula/UnityNativeFilePicker#faq" );
}
#if !UNITY_EDITOR && UNITY_ANDROID
return AJC.CallStatic<string>( "GetMimeTypeFromExtension", extension.ToLowerInvariant() );
#elif !UNITY_EDITOR && UNITY_IOS
return _NativeFilePicker_ConvertExtensionToUTI( extension.ToLowerInvariant() );
#else
return extension;
#endif
}
#endregion
#region Import Functions
public static void PickFile( FilePickedCallback callback, params string[] allowedFileTypes )
{
// If no file type is specified, allow all file types
if( allowedFileTypes == null || allowedFileTypes.Length == 0 )
{
#if UNITY_ANDROID
allowedFileTypes = new string[] { "*/*" };
#else
allowedFileTypes = new string[] { "public.item", "public.content" };
#endif
}
RequestPermissionAsync( ( permission ) =>
{
if( permission != Permission.Granted || IsFilePickerBusy() )
{
callback?.Invoke( null );
return;
}
#if UNITY_EDITOR
// Accept Android and iOS UTIs when possible, for user's convenience
string[] editorFilters = new string[allowedFileTypes.Length * 2];
for( int i = 0; i < allowedFileTypes.Length; i++ )
{
if( allowedFileTypes[i].IndexOf( '*' ) >= 0 )
{
if( allowedFileTypes[i] == "image/*" )
{
editorFilters[i * 2] = "Image files";
editorFilters[i * 2 + 1] = "png,jpg,jpeg";
}
else if( allowedFileTypes[i] == "video/*" )
{
editorFilters[i * 2] = "Video files";
editorFilters[i * 2 + 1] = "mp4,mov,webm,avi";
}
else if( allowedFileTypes[i] == "audio/*" )
{
editorFilters[i * 2] = "Audio files";
editorFilters[i * 2 + 1] = "mp3,wav,aac,flac";
}
else
{
editorFilters[i * 2] = "All files";
editorFilters[i * 2 + 1] = "*";
}
}
else
{
editorFilters[i * 2] = allowedFileTypes[i];
if( allowedFileTypes[i].IndexOf( '/' ) >= 0 ) // Android UTIs like 'image/png'
editorFilters[i * 2 + 1] = allowedFileTypes[i].Substring( allowedFileTypes[i].IndexOf( '/' ) + 1 );
else if( allowedFileTypes[i].StartsWith( "public." ) ) // iOS UTIs like 'public.png'
editorFilters[i * 2 + 1] = allowedFileTypes[i].Substring( 7 );
else if( allowedFileTypes[i].IndexOf( '.' ) == 0 ) // Extensions starting with period like '.png'
editorFilters[i * 2 + 1] = allowedFileTypes[i].Substring( 1 );
else
editorFilters[i * 2 + 1] = allowedFileTypes[i];
}
}
string pickedFile = UnityEditor.EditorUtility.OpenFilePanelWithFilters( "Select file", "", editorFilters );
if( callback != null )
callback( pickedFile != "" ? pickedFile : null );
#elif UNITY_ANDROID
AJC.CallStatic( "PickFiles", Context, new FPResultCallbackAndroid( callback, null, null ), false, SelectedFilePath, allowedFileTypes, "" );
#elif UNITY_IOS
FPResultCallbackiOS.Initialize( callback, null, null );
_NativeFilePicker_PickFile( allowedFileTypes, allowedFileTypes.Length );
#else
if( callback != null )
callback( null );
#endif
}, true );
}
public static void PickMultipleFiles( MultipleFilesPickedCallback callback, params string[] allowedFileTypes )
{
// If no file type is specified, allow all file types
if( allowedFileTypes == null || allowedFileTypes.Length == 0 )
{
#if UNITY_ANDROID
allowedFileTypes = new string[] { "*/*" };
#else
allowedFileTypes = new string[] { "public.item", "public.content" };
#endif
}
RequestPermissionAsync( ( permission ) =>
{
if( permission != Permission.Granted || IsFilePickerBusy() )
{
callback?.Invoke( null );
return;
}
if( CanPickMultipleFiles() )
{
#if !UNITY_EDITOR && UNITY_ANDROID
AJC.CallStatic( "PickFiles", Context, new FPResultCallbackAndroid( null, callback, null ), true, SelectedFilePath, allowedFileTypes, "" );
#elif !UNITY_EDITOR && UNITY_IOS
FPResultCallbackiOS.Initialize( null, callback, null );
_NativeFilePicker_PickMultipleFiles( allowedFileTypes, allowedFileTypes.Length );
#endif
}
else if( callback != null )
callback( null );
}, true );
}
#endregion
#region Export Functions
public static void ExportFile( string filePath, FilesExportedCallback callback = null )
{
if( string.IsNullOrEmpty( filePath ) )
throw new ArgumentException( "Parameter 'filePath' is null or empty!" );
RequestPermissionAsync( ( permission ) =>
{
if( permission != Permission.Granted || IsFilePickerBusy() )
{
callback?.Invoke( false );
return;
}
if( CanExportFiles() )
{
#if UNITY_EDITOR
string extension = Path.GetExtension( filePath );
if( extension == null )
extension = "";
else if( extension.IndexOf( '.' ) == 0 )
extension = extension.Substring( 1 );
string destination = UnityEditor.EditorUtility.SaveFilePanel( "Select destination", Path.GetDirectoryName( filePath ), Path.GetFileName( filePath ), extension );
if( string.IsNullOrEmpty( destination ) )
{
if( callback != null )
callback( false );
}
else
{
try
{
File.Copy( filePath, destination, true );
if( callback != null )
callback( true );
}
catch( Exception e )
{
Debug.LogException( e );
if( callback != null )
callback( false );
}
}
#elif UNITY_ANDROID
AJC.CallStatic( "ExportFiles", Context, new FPResultCallbackAndroid( null, null, callback ), new string[1] { filePath }, 1 );
#elif UNITY_IOS
FPResultCallbackiOS.Initialize( null, null, callback );
_NativeFilePicker_ExportFiles( new string[1] { filePath }, 1 );
#endif
}
else if( callback != null )
callback( false );
}, false );
}
public static void ExportMultipleFiles( string[] filePaths, FilesExportedCallback callback = null )
{
if( filePaths == null || filePaths.Length == 0 )
throw new ArgumentException( "Parameter 'filePaths' is null or empty!" );
RequestPermissionAsync( ( permission ) =>
{
if( permission != Permission.Granted || IsFilePickerBusy() )
{
callback?.Invoke( false );
return;
}
if( CanExportMultipleFiles() )
{
#if UNITY_EDITOR
string destination = UnityEditor.EditorUtility.OpenFolderPanel( "Select destination", Path.GetDirectoryName( filePaths[0] ), "" );
if( string.IsNullOrEmpty( destination ) )
{
if( callback != null )
callback( false );
}
else
{
try
{
for( int i = 0; i < filePaths.Length; i++ )
File.Copy( filePaths[i], Path.Combine( destination, Path.GetFileName( filePaths[i] ) ), true );
if( callback != null )
callback( true );
}
catch( Exception e )
{
Debug.LogException( e );
if( callback != null )
callback( false );
}
}
#elif UNITY_ANDROID
AJC.CallStatic( "ExportFiles", Context, new FPResultCallbackAndroid( null, null, callback ), filePaths, filePaths.Length );
#elif UNITY_IOS
FPResultCallbackiOS.Initialize( null, null, callback );
_NativeFilePicker_ExportFiles( filePaths, filePaths.Length );
#endif
}
else if( callback != null )
callback( false );
}, false );
}
#endregion
}
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 5ecdc359fc7b7e448a5aa6433eafcb8b
timeCreated: 1498722610
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/NativeFilePicker.cs
uploadId: 757770
@@ -0,0 +1,6 @@
= Native File Picker for Android & iOS (v1.4.1) =
Documentation: https://github.com/yasirkula/UnityNativeFilePicker
FAQ: https://github.com/yasirkula/UnityNativeFilePicker#faq
Example code: https://github.com/yasirkula/UnityNativeFilePicker#example-code
E-mail: yasirkula@gmail.com
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: a0357092d6d35434c8b136abfe2b6260
timeCreated: 1563308465
licenseType: Store
TextScriptImporter:
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/README.txt
uploadId: 757770
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8d99a20b76631e440a062e4fad822fc8
folderAsset: yes
timeCreated: 1592132993
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,155 @@
#if UNITY_EDITOR || UNITY_IOS
using UnityEngine;
namespace NativeFilePickerNamespace
{
public class FPResultCallbackiOS : MonoBehaviour
{
private static FPResultCallbackiOS instance;
private NativeFilePicker.FilePickedCallback pickCallback;
private NativeFilePicker.MultipleFilesPickedCallback pickCallbackMultiple;
private NativeFilePicker.FilesExportedCallback exportCallback;
private float nextBusyCheckTime;
public static bool IsBusy { get; private set; }
[System.Runtime.InteropServices.DllImport( "__Internal" )]
private static extern int _NativeFilePicker_IsFilePickerBusy();
public static void Initialize( NativeFilePicker.FilePickedCallback pickCallback, NativeFilePicker.MultipleFilesPickedCallback pickCallbackMultiple, NativeFilePicker.FilesExportedCallback exportCallback )
{
if( IsBusy )
return;
if( instance == null )
{
instance = new GameObject( "FPResultCallbackiOS" ).AddComponent<FPResultCallbackiOS>();
DontDestroyOnLoad( instance.gameObject );
}
instance.pickCallback = pickCallback;
instance.pickCallbackMultiple = pickCallbackMultiple;
instance.exportCallback = exportCallback;
instance.nextBusyCheckTime = Time.realtimeSinceStartup + 1f;
IsBusy = true;
}
private void Update()
{
if( IsBusy )
{
if( Time.realtimeSinceStartup >= nextBusyCheckTime )
{
nextBusyCheckTime = Time.realtimeSinceStartup + 1f;
if( _NativeFilePicker_IsFilePickerBusy() == 0 )
OnOperationCancelled( null );
}
}
}
[UnityEngine.Scripting.Preserve]
public void OnFilePicked( string path )
{
IsBusy = false;
if( string.IsNullOrEmpty( path ) )
path = null;
NativeFilePicker.FilePickedCallback _pickCallback = pickCallback;
pickCallback = null;
if( _pickCallback != null )
_pickCallback( path );
}
[UnityEngine.Scripting.Preserve]
public void OnMultipleFilesPicked( string paths )
{
IsBusy = false;
string[] _paths = SplitPaths( paths );
if( _paths != null && _paths.Length == 0 )
_paths = null;
NativeFilePicker.MultipleFilesPickedCallback _pickCallbackMultiple = pickCallbackMultiple;
pickCallbackMultiple = null;
if( _pickCallbackMultiple != null )
_pickCallbackMultiple( _paths );
}
[UnityEngine.Scripting.Preserve]
public void OnFilesExported( string message )
{
IsBusy = false;
NativeFilePicker.FilesExportedCallback _exportCallback = exportCallback;
exportCallback = null;
if( _exportCallback != null )
_exportCallback( message == "1" );
}
[UnityEngine.Scripting.Preserve]
public void OnOperationCancelled( string message )
{
IsBusy = false;
NativeFilePicker.FilePickedCallback _pickCallback = pickCallback;
NativeFilePicker.MultipleFilesPickedCallback _pickCallbackMultiple = pickCallbackMultiple;
NativeFilePicker.FilesExportedCallback _exportCallback = exportCallback;
pickCallback = null;
pickCallbackMultiple = null;
exportCallback = null;
if( _pickCallback != null )
_pickCallback( null );
if( _pickCallbackMultiple != null )
_pickCallbackMultiple( null );
if( _exportCallback != null )
_exportCallback( false );
}
private string[] SplitPaths( string paths )
{
string[] result = null;
if( !string.IsNullOrEmpty( paths ) )
{
string[] pathsSplit = paths.Split( '>' );
int validPathCount = 0;
for( int i = 0; i < pathsSplit.Length; i++ )
{
if( !string.IsNullOrEmpty( pathsSplit[i] ) )
validPathCount++;
}
if( validPathCount == 0 )
pathsSplit = new string[0];
else if( validPathCount != pathsSplit.Length )
{
string[] validPaths = new string[validPathCount];
for( int i = 0, j = 0; i < pathsSplit.Length; i++ )
{
if( !string.IsNullOrEmpty( pathsSplit[i] ) )
validPaths[j++] = pathsSplit[i];
}
pathsSplit = validPaths;
}
result = pathsSplit;
}
return result;
}
}
}
#endif
@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: b11d2999e16ca864f8974988d73c2017
timeCreated: 1519060539
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/iOS/FPResultCallbackiOS.cs
uploadId: 757770
@@ -0,0 +1,213 @@
#import <MobileCoreServices/MobileCoreServices.h>
extern UIViewController* UnityGetGLViewController();
@interface UNativeFilePicker:NSObject
+ (void)pickFiles:(BOOL)allowMultipleSelection withUTIs:(NSArray<NSString *> *)allowedUTIs;
+ (void)exportFiles:(NSArray<NSURL *> *)paths;
+ (int)canPickMultipleFiles;
+ (int)isFilePickerBusy;
+ (char *)convertExtensionToUTI:(NSString *)extension;
@end
@implementation UNativeFilePicker
static UIDocumentPickerViewController *filePicker;
static BOOL pickingMultipleFiles;
static int filePickerState = 0; // 0 -> none, 1 -> showing, 2 -> finished
+ (void)pickFiles:(BOOL)allowMultipleSelection withUTIs:(NSArray<NSString *> *)allowedUTIs
{
filePicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:allowedUTIs inMode:UIDocumentPickerModeImport];
filePicker.delegate = (id) self;
if( @available(iOS 11.0, *) )
filePicker.allowsMultipleSelection = allowMultipleSelection;
// Show file extensions if possible
if( @available(iOS 13.0, *) )
filePicker.shouldShowFileExtensions = YES;
pickingMultipleFiles = allowMultipleSelection;
filePickerState = 1;
[UnityGetGLViewController() presentViewController:filePicker animated:NO completion:^{ filePickerState = 0; }];
}
+ (void)exportFiles:(NSArray<NSURL *> *)paths
{
if( paths != nil && [paths count] > 0 )
{
if ([paths count] > 1 && [self canPickMultipleFiles] == 1)
filePicker = [[UIDocumentPickerViewController alloc] initWithURLs:paths inMode:UIDocumentPickerModeExportToService];
else
filePicker = [[UIDocumentPickerViewController alloc] initWithURL:paths[0] inMode:UIDocumentPickerModeExportToService];
filePicker.delegate = (id) self;
// Show file extensions if possible
if( @available(iOS 13.0, *) )
filePicker.shouldShowFileExtensions = YES;
filePickerState = 1;
[UnityGetGLViewController() presentViewController:filePicker animated:NO completion:^{ filePickerState = 0; }];
}
}
+ (int)canPickMultipleFiles
{
if( @available(iOS 11.0, *) )
return 1;
return 0;
}
+ (int)isFilePickerBusy
{
if( filePickerState == 2 )
return 1;
if( filePicker != nil )
{
if( filePickerState == 1 || [filePicker presentingViewController] == UnityGetGLViewController() )
return 1;
else
{
filePicker = nil;
return 0;
}
}
else
return 0;
}
// Credit: https://lists.apple.com/archives/cocoa-dev/2012/Jan/msg00052.html
+ (char *)convertExtensionToUTI:(NSString *)extension
{
CFStringRef fileUTI = UTTypeCreatePreferredIdentifierForTag( kUTTagClassFilenameExtension, (__bridge CFStringRef) extension, NULL );
char *result = [self getCString:(__bridge NSString *) fileUTI];
CFRelease( fileUTI );
return result;
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url
{
[self documentPickerCompleted:controller documents:@[url]];
}
#pragma clang diagnostic pop
+ (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls
{
[self documentPickerCompleted:controller documents:urls];
}
+ (void)documentPickerCompleted:(UIDocumentPickerViewController *)controller documents:(NSArray<NSURL *> *)urls
{
filePicker = nil;
filePickerState = 2;
if( controller.documentPickerMode == UIDocumentPickerModeImport )
{
if( !pickingMultipleFiles || [urls count] <= 1 )
{
const char* filePath;
if( [urls count] == 0 )
filePath = "";
else
filePath = [self getCString:[urls[0] path]];
if( pickingMultipleFiles )
UnitySendMessage( "FPResultCallbackiOS", "OnMultipleFilesPicked", filePath );
else
UnitySendMessage( "FPResultCallbackiOS", "OnFilePicked", filePath );
}
else
{
NSMutableArray<NSString *> *filePaths = [NSMutableArray arrayWithCapacity:[urls count]];
for( int i = 0; i < [urls count]; i++ )
[filePaths addObject:[urls[i] path]];
UnitySendMessage( "FPResultCallbackiOS", "OnMultipleFilesPicked", [self getCString:[filePaths componentsJoinedByString:@">"]] );
}
}
else if( controller.documentPickerMode == UIDocumentPickerModeExportToService )
{
if( [urls count] > 0 )
UnitySendMessage( "FPResultCallbackiOS", "OnFilesExported", "1" );
else
UnitySendMessage( "FPResultCallbackiOS", "OnFilesExported", "0" );
}
[controller dismissViewControllerAnimated:NO completion:nil];
}
+ (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller
{
filePicker = nil;
UnitySendMessage( "FPResultCallbackiOS", "OnOperationCancelled", "" );
[controller dismissViewControllerAnimated:NO completion:nil];
}
// Credit: https://stackoverflow.com/a/37052118/2373034
+ (char *)getCString:(NSString *)source
{
if( source == nil )
source = @"";
const char *sourceUTF8 = [source UTF8String];
char *result = (char*) malloc( strlen( sourceUTF8 ) + 1 );
strcpy(result, sourceUTF8);
return result;
}
@end
extern "C" void _NativeFilePicker_PickFile( const char* UTIs[], int UTIsCount )
{
NSMutableArray<NSString *> *allowedUTIs = [NSMutableArray arrayWithCapacity:UTIsCount];
for( int i = 0; i < UTIsCount; i++ )
[allowedUTIs addObject:[NSString stringWithUTF8String:UTIs[i]]];
[UNativeFilePicker pickFiles:NO withUTIs:allowedUTIs];
}
extern "C" void _NativeFilePicker_PickMultipleFiles( const char* UTIs[], int UTIsCount )
{
NSMutableArray<NSString *> *allowedUTIs = [NSMutableArray arrayWithCapacity:UTIsCount];
for( int i = 0; i < UTIsCount; i++ )
[allowedUTIs addObject:[NSString stringWithUTF8String:UTIs[i]]];
[UNativeFilePicker pickFiles:YES withUTIs:allowedUTIs];
}
extern "C" void _NativeFilePicker_ExportFiles( const char* files[], int filesCount )
{
NSMutableArray<NSURL *> *paths = [NSMutableArray arrayWithCapacity:filesCount];
for( int i = 0; i < filesCount; i++ )
{
NSString *filePath = [NSString stringWithUTF8String:files[i]];
[paths addObject:[NSURL fileURLWithPath:filePath]];
}
[UNativeFilePicker exportFiles:paths];
}
extern "C" int _NativeFilePicker_CanPickMultipleFiles()
{
return [UNativeFilePicker canPickMultipleFiles];
}
extern "C" int _NativeFilePicker_IsFilePickerBusy()
{
return [UNativeFilePicker isFilePickerBusy];
}
extern "C" char* _NativeFilePicker_ConvertExtensionToUTI( const char* extension )
{
return [UNativeFilePicker convertExtensionToUTI:[NSString stringWithUTF8String:extension]];
}
@@ -0,0 +1,40 @@
fileFormatVersion: 2
guid: 4c65eb8688946be4ea1af62f377f8891
timeCreated: 1498722774
licenseType: Store
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
iPhone: iOS
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 173238
packageName: Native File Picker for Android & iOS
packageVersion: 1.4.1
assetPath: Assets/Plugins/NativeFilePicker/iOS/NativeFilePicker.mm
uploadId: 757770
@@ -12,4 +12,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab6d921463750b04aaccb1bf3b2d9608, type: 3}
m_Name: InputServiceConfig
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Input.InputServiceConfig
inputActionAsset: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
inputActionAsset: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
+114 -114
View File
@@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3093252495306112961
--- !u!1 &6650273595372551440
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -8,111 +8,9 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 85526656748497033}
- component: {fileID: 5474172051638134131}
- component: {fileID: 4522556149065460202}
- component: {fileID: 3454116689055038688}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &85526656748497033
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3093252495306112961}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 9125308170007725291}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &5474172051638134131
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3093252495306112961}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 1
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 1
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &4522556149065460202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3093252495306112961}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &3454116689055038688
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3093252495306112961}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &6243395250032418262
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9125308170007725291}
- component: {fileID: 3667409677689196428}
- component: {fileID: 3342802897908395069}
- component: {fileID: 4575823044398036904}
- component: {fileID: 2630666168266589900}
- component: {fileID: 659249921352961972}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
@@ -120,28 +18,28 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &9125308170007725291
--- !u!4 &4575823044398036904
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6243395250032418262}
m_GameObject: {fileID: 6650273595372551440}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -640, y: -360, z: 0}
m_LocalPosition: {x: -360, y: -640, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 85526656748497033}
m_Father: {fileID: 6715626251186477161}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3667409677689196428
--- !u!114 &2630666168266589900
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6243395250032418262}
m_GameObject: {fileID: 6650273595372551440}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
@@ -150,13 +48,13 @@ MonoBehaviour:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!114 &3342802897908395069
--- !u!114 &659249921352961972
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6243395250032418262}
m_GameObject: {fileID: 6650273595372551440}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
@@ -181,3 +79,105 @@ MonoBehaviour:
m_PointerBehavior: 0
m_CursorLockBehavior: 0
m_ScrollDeltaPerTick: 6
--- !u!1 &7008556861191420908
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6715626251186477161}
- component: {fileID: 6976550510986434516}
- component: {fileID: 4324417118856064204}
- component: {fileID: 6577896291693304153}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6715626251186477161
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7008556861191420908}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4575823044398036904}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!223 &6976550510986434516
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7008556861191420908}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 1
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &4324417118856064204
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7008556861191420908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &6577896291693304153
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7008556861191420908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
@@ -38,13 +38,12 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
@@ -67,12 +66,9 @@ LightmapSettings:
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_BakeBackend: 2
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
@@ -89,22 +85,22 @@ LightmapSettings:
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringGaussRadiusIndirect: 1
m_PVRFilteringGaussRadiusAO: 1
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
@@ -117,13 +113,13 @@ NavMeshSettings:
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &519420028
--- !u!1 &1327277297
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -131,10 +127,54 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 519420032}
- component: {fileID: 519420031}
- component: {fileID: 519420029}
- component: {fileID: 519420030}
- component: {fileID: 1327277299}
- component: {fileID: 1327277298}
m_Layer: 0
m_Name: SceneScope
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1327277298
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1327277297}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5312032623c34414a54ea00e35a7eb8e, type: 3}
m_Name:
m_EditorClassIdentifier: Reflex::Reflex.Core.ContainerScope
--- !u!4 &1327277299
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1327277297}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2025479801
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2025479805}
- component: {fileID: 2025479804}
- component: {fileID: 2025479803}
- component: {fileID: 2025479802}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@@ -142,27 +182,19 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &519420029
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
--- !u!114 &519420030
--- !u!114 &2025479802
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_GameObject: {fileID: 2025479801}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
m_RenderShadows: 0
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
@@ -172,6 +204,7 @@ MonoBehaviour:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
@@ -179,26 +212,53 @@ MonoBehaviour:
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
m_Version: 2
--- !u!20 &519420031
--- !u!81 &2025479803
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2025479801}
m_Enabled: 1
--- !u!20 &2025479804
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_GameObject: {fileID: 2025479801}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_BackGroundColor: {r: 0.95251465, g: 0.9716981, b: 0.8937789, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@@ -207,7 +267,7 @@ Camera:
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 34
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
@@ -217,136 +277,130 @@ Camera:
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 0
m_HDR: 1
m_AllowMSAA: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &519420032
--- !u!4 &2025479805
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_GameObject: {fileID: 2025479801}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &619394800
GameObject:
--- !u!1001 &7382841504400031287
PrefabInstance:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 619394802}
- component: {fileID: 619394801}
m_Layer: 0
m_Name: Global Light 2D
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &619394801
MonoBehaviour:
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6715626251186477161, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7008556861191420908, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
propertyPath: m_Name
value: Canvas
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e1fbe5b2798657342b569f723d16c9de, type: 3}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 619394800}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 073797afb82c5a1438f328866b10b3f0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ComponentVersion: 1
m_LightType: 4
m_BlendStyleIndex: 0
m_FalloffIntensity: 0.5
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_LightVolumeIntensity: 1
m_LightVolumeIntensityEnabled: 0
m_ApplyToSortingLayers: 00000000
m_LightCookieSprite: {fileID: 0}
m_DeprecatedPointLightCookieSprite: {fileID: 0}
m_LightOrder: 0
m_OverlapOperation: 0
m_NormalMapDistance: 3
m_NormalMapQuality: 2
m_UseNormalMap: 0
m_ShadowIntensityEnabled: 0
m_ShadowIntensity: 0.75
m_ShadowVolumeIntensityEnabled: 0
m_ShadowVolumeIntensity: 0.75
m_Vertices:
- position: {x: 0.9985302, y: 0.9985302, z: 0}
color: {r: 0.70710677, g: 0.70710677, b: 0, a: 0}
uv: {x: 0, y: 0}
- position: {x: 0.9985302, y: 0.9985302, z: 0}
color: {r: 0, g: 0, b: 0, a: 1}
uv: {x: 0, y: 0}
- position: {x: -0.9985302, y: 0.9985302, z: 0}
color: {r: -0.70710677, g: 0.70710677, b: 0, a: 0}
uv: {x: 0, y: 0}
- position: {x: -0.9985302, y: 0.9985302, z: 0}
color: {r: 0, g: 0, b: 0, a: 1}
uv: {x: 0, y: 0}
- position: {x: -0.99853003, y: -0.9985304, z: 0}
color: {r: -0.70710665, g: -0.7071069, b: 0, a: 0}
uv: {x: 0, y: 0}
- position: {x: -0.99853003, y: -0.9985304, z: 0}
color: {r: 0, g: 0, b: 0, a: 1}
uv: {x: 0, y: 0}
- position: {x: 0.99853003, y: -0.9985304, z: 0}
color: {r: 0.70710665, g: -0.7071069, b: 0, a: 0}
uv: {x: 0, y: 0}
- position: {x: 0.99853003, y: -0.9985304, z: 0}
color: {r: 0, g: 0, b: 0, a: 1}
uv: {x: 0, y: 0}
- position: {x: 0, y: 0, z: 0}
color: {r: 0, g: 0, b: 0, a: 1}
uv: {x: 0, y: 0}
m_Triangles: 030001000800020000000100030002000100050003000800040002000300050004000300070005000800060004000500070006000500010007000800000006000700010000000700
m_LocalBounds:
m_Center: {x: 0, y: -0.00000011920929, z: 0}
m_Extent: {x: 0.9985302, y: 0.99853027, z: 0}
m_PointLightInnerAngle: 360
m_PointLightOuterAngle: 360
m_PointLightInnerRadius: 0
m_PointLightOuterRadius: 1
m_ShapeLightParametricSides: 5
m_ShapeLightParametricAngleOffset: 0
m_ShapeLightParametricRadius: 1
m_ShapeLightFalloffSize: 0.5
m_ShapeLightFalloffOffset: {x: 0, y: 0}
m_ShapePath:
- {x: -0.5, y: -0.5, z: 0}
- {x: 0.5, y: -0.5, z: 0}
- {x: 0.5, y: 0.5, z: 0}
- {x: -0.5, y: 0.5, z: 0}
--- !u!4 &619394802
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 619394800}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Roots:
- {fileID: 2025479805}
- {fileID: 7382841504400031287}
- {fileID: 1327277299}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8c9cfa26abfee488c85f1582747f6a02
guid: 90e4de6cc3fe5d0489cc3309fe1ec4d6
DefaultImporter:
externalObjects: {}
userData:
@@ -3,12 +3,6 @@
#pragma warning disable CS0105
using Code.Infrastructure.StateMachine;
using Code.Infrastructure.App.States;
using Code.Infrastructure.App.States;
using Code.Example.Platformer;
using Code.Infrastructure.App.States;
#pragma warning restore CS0105
@@ -21,18 +15,9 @@ public partial class AppStateMachine : AbstractStateMachine<Code.Infrastructure.
public AppStateMachine(Code.Infrastructure.App.AppStateMachineContext context, EventBus.EventBus eventBus) : base(context)
{
var stateGameplayState = new GameplayState(StateMachineContext,eventBus);
States.Add(stateGameplayState.myState, stateGameplayState);
var stateBootstrapState = new BootstrapState(StateMachineContext,eventBus);
States.Add(stateBootstrapState.myState, stateBootstrapState);
var statePlatformerState = new PlatformerState(StateMachineContext,eventBus);
States.Add(statePlatformerState.myState, statePlatformerState);
var stateMainMenuState = new MainMenuState(StateMachineContext,eventBus);
States.Add(stateMainMenuState.myState, stateMainMenuState);
}
protected override bool CheckTransitionAllowed(Code.Infrastructure.App.AppStates nextState) => AllowedStates.HasFlag(nextState);
@@ -1,18 +1,13 @@
#pragma warning disable CS0105
using Code.Example.Race.Racer;
using Code.Infrastructure.Configs;
using Code.Infrastructure.Camera;
using Code.Infrastructure.UI;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Camera;
using Code.Infrastructure.UI;
using Code.Infrastructure.UI;
using Code.Infrastructure.Audio;
using Code.Infrastructure.SceneLoader;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Volume;
using Code.Example.Platformer.Entity;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Input;
using Code.Infrastructure.Configs;
using Code.Infrastructure.Audio;
using UnityEngine;
#pragma warning restore CS0105
@@ -26,32 +21,22 @@ using Code.Infrastructure.Input;
{
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
_multipleConfigReferences.Add(typeof(Code.Example.Race.Racer.RacerSettingsConfig), systemConfigsReferences.RacerSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Configs.LayerMasksConfigConfig), systemConfigsReferences.LayerMasksConfig);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Camera.CameraSettingsConfig), systemConfigsReferences.CameraSettings);
_singleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourcePrefabConfig), systemConfigsReferences.AudioSourcePrefab);
_singleConfigReferences.Add(typeof(Code.Infrastructure.Camera.GameCameraConfig), systemConfigsReferences.GameCamera);
_singleConfigReferences.Add(typeof(Code.Infrastructure.UI.CanvasSettingsConfig), systemConfigsReferences.CanvasSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.UI.UIPanelSettingsConfig), systemConfigsReferences.UIPanelSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.SceneLoader.SceneInfoConfig), systemConfigsReferences.SceneInfo);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioInfoConfig), systemConfigsReferences.AudioInfo);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Volume.VolumeSettingsConfig), systemConfigsReferences.VolumeSettings);
_multipleConfigReferences.Add(typeof(Code.Example.Platformer.Entity.PlatformerEnemySettingsConfig), systemConfigsReferences.PlatformerEnemySettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.UI.UIPanelSettingsConfig), systemConfigsReferences.UIPanelSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourceSettingsConfig), systemConfigsReferences.AudioSourceSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.SceneLoader.SceneInfoConfig), systemConfigsReferences.SceneInfo);
_singleConfigReferences.Add(typeof(Code.Infrastructure.Input.InputServiceConfig), systemConfigsReferences.InputService);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Configs.LayerMasksConfigConfig), systemConfigsReferences.LayerMasksConfig);
_singleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourcePrefabConfig), systemConfigsReferences.AudioSourcePrefab);
//_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
}
}
@@ -14,14 +14,6 @@ partial void SetupScenesInfo(){
_scenesActions.Add(SceneId.MainMenu,() => _eventBus.RaiseEvent<IOnMainMenuSceneLoadedHandler>(h=> h.OnMainMenuSceneLoaded()));
_scenesActions.Add(SceneId.Gameplay,() => _eventBus.RaiseEvent<IOnGameplaySceneLoadedHandler>(h=> h.OnGameplaySceneLoaded()));
_scenesActions.Add(SceneId.SoundTest,() => _eventBus.RaiseEvent<IOnSoundTestSceneLoadedHandler>(h=> h.OnSoundTestSceneLoaded()));
_scenesActions.Add(SceneId.Platformer,() => _eventBus.RaiseEvent<IOnPlatformerSceneLoadedHandler>(h=> h.OnPlatformerSceneLoaded()));
}
}
@@ -1,18 +1,13 @@
#pragma warning disable CS0105
using Code.Example.Race.Racer;
using Code.Infrastructure.Configs;
using Code.Infrastructure.Camera;
using Code.Infrastructure.UI;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Camera;
using Code.Infrastructure.UI;
using Code.Infrastructure.UI;
using Code.Infrastructure.Audio;
using Code.Infrastructure.SceneLoader;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Volume;
using Code.Example.Platformer.Entity;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Input;
using Code.Infrastructure.Configs;
using Code.Infrastructure.Audio;
using UnityEngine.AddressableAssets;
#pragma warning restore CS0105
@@ -20,19 +15,14 @@ using Code.Infrastructure.Input;
namespace Code.Infrastructure.Configs{
public partial class SystemConfigsReferences
{
public string RacerSettings;
public string LayerMasksConfig;
public string CameraSettings;
public AssetReference AudioSourcePrefab;
public AssetReference GameCamera;
public AssetReference CanvasSettings;
public string UIPanelSettings;
public string SceneInfo;
public AssetReference CanvasSettings;
public string AudioInfo;
public string VolumeSettings;
public string PlatformerEnemySettings;
public string UIPanelSettings;
public string AudioSourceSettings;
public string SceneInfo;
public AssetReference InputService;
public string LayerMasksConfig;
public AssetReference AudioSourcePrefab;
}
}