From be9bdc33a47445cceb354733e42d6834f8dd1f2c Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 22:58:09 +0900 Subject: [PATCH 1/8] Open Project with Unity 2020 LTS --- unity/NativeDialogPlugin/.gitignore | 76 +++- .../Assets/NativeDialogSample.cs | 60 +++ ...est.cs.meta => NativeDialogSample.cs.meta} | 0 .../Assets/NativeDialogSample.unity | 264 +++++++++++ ...ity.meta => NativeDialogSample.unity.meta} | 0 .../NativeDialogSampleSettings.lighting | 63 +++ .../NativeDialogSampleSettings.lighting.meta | 8 + .../NativeDialogPlugin/Assets/Resources.meta | 8 + unity/NativeDialogPlugin/Assets/test.cs | 47 -- unity/NativeDialogPlugin/Assets/test.unity | 202 --------- .../NativeDialogPlugin/Packages/manifest.json | 49 +++ .../Packages/packages-lock.json | 411 ++++++++++++++++++ .../ProjectSettings/ClusterInputManager.asset | 6 + .../ProjectSettings/GraphicsSettings.asset | 58 +++ .../ProjectSettings/NavMeshAreas.asset | 133 ++++++ .../PackageManagerSettings.asset | 43 ++ .../ProjectSettings/PresetManager.asset | 7 + .../ProjectSettings/ProjectVersion.txt | 2 + .../UnityConnectSettings.asset | 35 ++ .../ProjectSettings/VFXManager.asset | 14 + .../VersionControlSettings.asset | 8 + 21 files changed, 1244 insertions(+), 250 deletions(-) create mode 100644 unity/NativeDialogPlugin/Assets/NativeDialogSample.cs rename unity/NativeDialogPlugin/Assets/{test.cs.meta => NativeDialogSample.cs.meta} (100%) create mode 100644 unity/NativeDialogPlugin/Assets/NativeDialogSample.unity rename unity/NativeDialogPlugin/Assets/{test.unity.meta => NativeDialogSample.unity.meta} (100%) create mode 100644 unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting create mode 100644 unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting.meta create mode 100644 unity/NativeDialogPlugin/Assets/Resources.meta delete mode 100644 unity/NativeDialogPlugin/Assets/test.cs delete mode 100644 unity/NativeDialogPlugin/Assets/test.unity create mode 100644 unity/NativeDialogPlugin/Packages/manifest.json create mode 100644 unity/NativeDialogPlugin/Packages/packages-lock.json create mode 100644 unity/NativeDialogPlugin/ProjectSettings/ClusterInputManager.asset create mode 100644 unity/NativeDialogPlugin/ProjectSettings/NavMeshAreas.asset create mode 100644 unity/NativeDialogPlugin/ProjectSettings/PackageManagerSettings.asset create mode 100644 unity/NativeDialogPlugin/ProjectSettings/PresetManager.asset create mode 100644 unity/NativeDialogPlugin/ProjectSettings/ProjectVersion.txt create mode 100644 unity/NativeDialogPlugin/ProjectSettings/UnityConnectSettings.asset create mode 100644 unity/NativeDialogPlugin/ProjectSettings/VFXManager.asset create mode 100644 unity/NativeDialogPlugin/ProjectSettings/VersionControlSettings.asset diff --git a/unity/NativeDialogPlugin/.gitignore b/unity/NativeDialogPlugin/.gitignore index 1e971b4..be05a4c 100644 --- a/unity/NativeDialogPlugin/.gitignore +++ b/unity/NativeDialogPlugin/.gitignore @@ -4,4 +4,78 @@ Temp *.sln *.pidb *.userprefs -*.unityproj \ No newline at end of file +*.unityproj### https://raw.github.com/github/gitignore/cdd9e946da421758c6f42c427c7bc65c8326155d/Unity.gitignore + +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Uu]ser[Ss]ettings/ + +# MemoryCaptures can get excessive in size. +# They also could contain extremely sensitive data +/[Mm]emoryCaptures/ + +# Asset meta data should only be ignored when the corresponding asset is also ignored +!/[Aa]ssets/**/*.meta + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# Autogenerated Jetbrains Rider plugin +/[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.aab +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties + +# Packed Addressables +/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* + +# Temporary auto-generated Android Assets +/[Aa]ssets/[Ss]treamingAssets/aa.meta +/[Aa]ssets/[Ss]treamingAssets/aa/* + + diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs new file mode 100644 index 0000000..add8f13 --- /dev/null +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs @@ -0,0 +1,60 @@ +using UnityEngine; +using System.Collections; + +public class NativeDialogSample : MonoBehaviour +{ + public string decideLabel; + public string cancelLabel; + public string closeLabel; + + void Start() + { + DialogManager.Instance.SetLabel(decideLabel, cancelLabel, closeLabel); + } + + void OnGUI() + { + if (GUILayout.Button("aaa", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + { + DialogManager.Instance.ShowSelectDialog("aaa", (bool result) => + { + Debug.Log("aaa" + result); + }); + } + if (GUILayout.Button("bbb", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + { + DialogManager.Instance.ShowSelectDialog("b title", "bbb", (bool result) => + { + Debug.Log("bbb" + result); + }); + } + if (GUILayout.Button("ccc", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + { + DialogManager.Instance.ShowSubmitDialog("ccc", (bool result) => + { + Debug.Log("ccc"); + }); + } + if (GUILayout.Button("ddd", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + { + DialogManager.Instance.ShowSubmitDialog("d title", "ddd", (bool result) => + { + Debug.Log("ddd"); + }); + } + if (GUILayout.Button("eee auto dissmiss", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + { + int id = DialogManager.Instance.ShowSelectDialog("eee", (bool result) => + { + Debug.Log("eee" + result); + }); + StartCoroutine(Dissmiss(id, 3f)); + } + } + + private IEnumerator Dissmiss(int id, float time) + { + yield return new WaitForSeconds(time); + DialogManager.Instance.DissmissDialog(id); + } +} diff --git a/unity/NativeDialogPlugin/Assets/test.cs.meta b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/test.cs.meta rename to unity/NativeDialogPlugin/Assets/NativeDialogSample.cs.meta diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity new file mode 100644 index 0000000..a886b64 --- /dev/null +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity @@ -0,0 +1,264 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + 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 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 1 + m_BakeResolution: 50 + m_AtlasSize: 1024 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 3c1940c0672bf47a19234c32e772c153, + type: 2} +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &969519936 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 969519941} + - component: {fileID: 969519940} + - component: {fileID: 969519938} + - component: {fileID: 969519937} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &969519937 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 969519936} + m_Enabled: 1 +--- !u!124 &969519938 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 969519936} + m_Enabled: 1 +--- !u!20 &969519940 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 969519936} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 100 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &969519941 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 969519936} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1045089952 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1045089953} + - component: {fileID: 1045089954} + m_Layer: 0 + m_Name: Sample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1045089953 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1045089952} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1045089954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1045089952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9cee4dadaa0d847beaaf529b100028ec, type: 3} + m_Name: + m_EditorClassIdentifier: + decideLabel: "\u306F\u3044" + cancelLabel: "\u3044\u3044\u3048" + closeLabel: "\u9589\u3058\u308B" diff --git a/unity/NativeDialogPlugin/Assets/test.unity.meta b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/test.unity.meta rename to unity/NativeDialogPlugin/Assets/NativeDialogSample.unity.meta diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting b/unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting new file mode 100644 index 0000000..49c86c9 --- /dev/null +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: NativeDialogSampleSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 50 + m_Padding: 2 + m_TextureCompression: 0 + m_AO: 1 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 1 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 0 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting.meta b/unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting.meta new file mode 100644 index 0000000..d8c519d --- /dev/null +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSampleSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3c1940c0672bf47a19234c32e772c153 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/NativeDialogPlugin/Assets/Resources.meta b/unity/NativeDialogPlugin/Assets/Resources.meta new file mode 100644 index 0000000..8823d6e --- /dev/null +++ b/unity/NativeDialogPlugin/Assets/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b015d02ed885434187be9a5dc17b314 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/NativeDialogPlugin/Assets/test.cs b/unity/NativeDialogPlugin/Assets/test.cs deleted file mode 100644 index 419d41c..0000000 --- a/unity/NativeDialogPlugin/Assets/test.cs +++ /dev/null @@ -1,47 +0,0 @@ -using UnityEngine; -using System.Collections; - -public class test : MonoBehaviour { - - public string decideLabel; - public string cancelLabel; - public string closeLabel; - - void Start() { - DialogManager.Instance.SetLabel(decideLabel, cancelLabel, closeLabel); - } - - void OnGUI() { - if(GUILayout.Button("aaa", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) { - DialogManager.Instance.ShowSelectDialog("aaa", (bool result) => { - Debug.Log("aaa"+result); - }); - } - if(GUILayout.Button("bbb", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) { - DialogManager.Instance.ShowSelectDialog("b title" ,"bbb", (bool result) => { - Debug.Log("bbb"+result); - }); - } - if(GUILayout.Button("ccc", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) { - DialogManager.Instance.ShowSubmitDialog("ccc", (bool result) => { - Debug.Log ("ccc"); - }); - } - if(GUILayout.Button("ddd", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) { - DialogManager.Instance.ShowSubmitDialog("d title", "ddd", (bool result) => { - Debug.Log ("ddd"); - }); - } - if(GUILayout.Button("eee auto dissmiss", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) { - int id = DialogManager.Instance.ShowSelectDialog("eee", (bool result) => { - Debug.Log("eee"+result); - }); - StartCoroutine(dissmiss(id, 3f)); - } - } - - IEnumerator dissmiss (int id, float time) { - yield return new WaitForSeconds (time); - DialogManager.Instance.DissmissDialog (id); - } -} diff --git a/unity/NativeDialogPlugin/Assets/test.unity b/unity/NativeDialogPlugin/Assets/test.unity deleted file mode 100644 index 03da809..0000000 --- a/unity/NativeDialogPlugin/Assets/test.unity +++ /dev/null @@ -1,202 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -SceneSettings: - m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: .25 - backfaceThreshold: 100 ---- !u!104 &2 -RenderSettings: - m_Fog: 0 - m_FogColor: {r: .5, g: .5, b: .5, a: 1} - m_FogMode: 3 - m_FogDensity: .00999999978 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: .5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 0} - m_ObjectHideFlags: 0 ---- !u!127 &3 -LevelGameManager: - m_ObjectHideFlags: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - m_LightProbes: {fileID: 0} - m_Lightmaps: [] - m_LightmapsMode: 1 - m_BakedColorSpace: 0 - m_UseDualLightmapsInForward: 0 - m_LightmapEditorSettings: - m_Resolution: 50 - m_LastUsedResolution: 0 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_BounceBoost: 1 - m_BounceIntensity: 1 - m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1} - m_SkyLightIntensity: 0 - m_Quality: 0 - m_Bounces: 1 - m_FinalGatherRays: 1000 - m_FinalGatherContrastThreshold: .0500000007 - m_FinalGatherGradientThreshold: 0 - m_FinalGatherInterpolationPoints: 15 - m_AOAmount: 0 - m_AOMaxDistance: .100000001 - m_AOContrast: 1 - m_LODSurfaceMappingDistance: 1 - m_Padding: 0 - m_TextureCompression: 0 - m_LockAtlas: 0 ---- !u!196 &5 -NavMeshSettings: - m_ObjectHideFlags: 0 - m_BuildSettings: - agentRadius: .5 - agentHeight: 2 - agentSlope: 45 - agentClimb: .400000006 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - accuratePlacement: 0 - minRegionArea: 2 - widthInaccuracy: 16.666666 - heightInaccuracy: 10 - m_NavMesh: {fileID: 0} ---- !u!1 &969519936 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 969519941} - - 20: {fileID: 969519940} - - 92: {fileID: 969519939} - - 124: {fileID: 969519938} - - 81: {fileID: 969519937} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &969519937 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 969519936} - m_Enabled: 1 ---- !u!124 &969519938 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 969519936} - m_Enabled: 1 ---- !u!92 &969519939 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 969519936} - m_Enabled: 1 ---- !u!20 &969519940 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 969519936} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: .300000012 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 100 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_HDR: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: .0219999999 ---- !u!4 &969519941 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 969519936} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!1 &1045089952 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1045089953} - - 114: {fileID: 1045089954} - m_Layer: 0 - m_Name: test - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1045089953 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1045089952} - 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 ---- !u!114 &1045089954 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1045089952} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9cee4dadaa0d847beaaf529b100028ec, type: 3} - m_Name: - m_EditorClassIdentifier: - decideLabel: "\u306F\u3044" - cancelLabel: "\u3044\u3044\u3048" - closeLabel: "\u9589\u3058\u308B" diff --git a/unity/NativeDialogPlugin/Packages/manifest.json b/unity/NativeDialogPlugin/Packages/manifest.json new file mode 100644 index 0000000..85c4794 --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/manifest.json @@ -0,0 +1,49 @@ +{ + "dependencies": { + "com.unity.2d.sprite": "1.0.0", + "com.unity.2d.tilemap": "1.0.0", + "com.unity.ads": "3.7.5", + "com.unity.analytics": "3.6.11", + "com.unity.collab-proxy": "1.15.1", + "com.unity.ide.rider": "2.0.7", + "com.unity.ide.visualstudio": "2.0.11", + "com.unity.ide.vscode": "1.2.4", + "com.unity.purchasing": "4.0.3", + "com.unity.test-framework": "1.1.29", + "com.unity.textmeshpro": "3.0.6", + "com.unity.timeline": "1.4.8", + "com.unity.ugui": "1.0.0", + "com.unity.xr.legacyinputhelpers": "2.1.8", + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "com.unity.modules.video": "1.0.0", + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.wind": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } +} diff --git a/unity/NativeDialogPlugin/Packages/packages-lock.json b/unity/NativeDialogPlugin/Packages/packages-lock.json new file mode 100644 index 0000000..8e81a14 --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/packages-lock.json @@ -0,0 +1,411 @@ +{ + "dependencies": { + "com.unity.2d.sprite": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.2d.tilemap": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.ads": { + "version": "3.7.5", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.analytics": { + "version": "3.6.11", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.collab-proxy": { + "version": "1.15.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.nuget.newtonsoft-json": "2.0.0", + "com.unity.services.core": "1.0.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ext.nunit": { + "version": "1.0.6", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.ide.rider": { + "version": "2.0.7", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ide.visualstudio": { + "version": "2.0.11", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.9" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ide.vscode": { + "version": "1.2.4", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.nuget.newtonsoft-json": { + "version": "2.0.0", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.purchasing": { + "version": "4.0.3", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", + "com.unity.services.core": "1.0.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.services.core": { + "version": "1.0.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.test-framework": { + "version": "1.1.29", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ext.nunit": "1.0.6", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.textmeshpro": { + "version": "3.0.6", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.timeline": { + "version": "1.4.8", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.director": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ugui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0" + } + }, + "com.unity.xr.legacyinputhelpers": { + "version": "2.1.8", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.xr": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.modules.ai": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.androidjni": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.animation": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.assetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.audio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.cloth": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.director": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.animation": "1.0.0" + } + }, + "com.unity.modules.imageconversion": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.particlesystem": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics2d": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.screencapture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.subsystems": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.terrain": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.terrainphysics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.terrain": "1.0.0" + } + }, + "com.unity.modules.tilemap": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics2d": "1.0.0" + } + }, + "com.unity.modules.ui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.uielements": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.uielementsnative": "1.0.0" + } + }, + "com.unity.modules.uielementsnative": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.umbra": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unityanalytics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.unitywebrequest": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unitywebrequestassetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestaudio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.audio": "1.0.0" + } + }, + "com.unity.modules.unitywebrequesttexture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestwww": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.vehicles": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.video": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.vr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } + }, + "com.unity.modules.wind": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.xr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.subsystems": "1.0.0" + } + } + } +} diff --git a/unity/NativeDialogPlugin/ProjectSettings/ClusterInputManager.asset b/unity/NativeDialogPlugin/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..e7886b2 --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/unity/NativeDialogPlugin/ProjectSettings/GraphicsSettings.asset b/unity/NativeDialogPlugin/ProjectSettings/GraphicsSettings.asset index 553f97d..346a303 100644 --- a/unity/NativeDialogPlugin/ProjectSettings/GraphicsSettings.asset +++ b/unity/NativeDialogPlugin/ProjectSettings/GraphicsSettings.asset @@ -3,5 +3,63 @@ --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 + serializedVersion: 13 + m_Deferred: + m_Mode: 1 + m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} + m_DeferredReflections: + m_Mode: 1 + m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} + m_LegacyDeferred: + m_Mode: 1 + m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_VideoShadersIncludeMode: 2 m_AlwaysIncludedShaders: - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} + m_PreloadedShaders: [] + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, + type: 0} + m_CustomRenderPipeline: {fileID: 0} + m_TransparencySortMode: 0 + m_TransparencySortAxis: {x: 0, y: 0, z: 1} + m_DefaultRenderingPath: 1 + m_DefaultMobileRenderingPath: 1 + m_TierSettings: [] + m_LightmapStripping: 0 + m_FogStripping: 0 + m_InstancingStripping: 0 + m_LightmapKeepPlain: 1 + m_LightmapKeepDirCombined: 1 + m_LightmapKeepDynamicPlain: 1 + m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepShadowMask: 1 + m_LightmapKeepSubtractive: 1 + m_FogKeepLinear: 1 + m_FogKeepExp: 1 + m_FogKeepExp2: 1 + m_AlbedoSwatchInfos: [] + m_LightsUseLinearIntensity: 0 + m_LightsUseColorTemperature: 0 + m_DefaultRenderingLayerMask: 1 + m_LogWhenShaderIsCompiled: 0 diff --git a/unity/NativeDialogPlugin/ProjectSettings/NavMeshAreas.asset b/unity/NativeDialogPlugin/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..79cb3ae --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/NavMeshAreas.asset @@ -0,0 +1,133 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshLayers: + m_ObjectHideFlags: 0 + Built-in Layer 0: + name: Default + cost: 1 + editType: 2 + Built-in Layer 1: + name: Not Walkable + cost: 1 + editType: 0 + Built-in Layer 2: + name: Jump + cost: 2 + editType: 2 + User Layer 0: + name: + cost: 1 + editType: 3 + User Layer 1: + name: + cost: 1 + editType: 3 + User Layer 2: + name: + cost: 1 + editType: 3 + User Layer 3: + name: + cost: 1 + editType: 3 + User Layer 4: + name: + cost: 1 + editType: 3 + User Layer 5: + name: + cost: 1 + editType: 3 + User Layer 6: + name: + cost: 1 + editType: 3 + User Layer 7: + name: + cost: 1 + editType: 3 + User Layer 8: + name: + cost: 1 + editType: 3 + User Layer 9: + name: + cost: 1 + editType: 3 + User Layer 10: + name: + cost: 1 + editType: 3 + User Layer 11: + name: + cost: 1 + editType: 3 + User Layer 12: + name: + cost: 1 + editType: 3 + User Layer 13: + name: + cost: 1 + editType: 3 + User Layer 14: + name: + cost: 1 + editType: 3 + User Layer 15: + name: + cost: 1 + editType: 3 + User Layer 16: + name: + cost: 1 + editType: 3 + User Layer 17: + name: + cost: 1 + editType: 3 + User Layer 18: + name: + cost: 1 + editType: 3 + User Layer 19: + name: + cost: 1 + editType: 3 + User Layer 20: + name: + cost: 1 + editType: 3 + User Layer 21: + name: + cost: 1 + editType: 3 + User Layer 22: + name: + cost: 1 + editType: 3 + User Layer 23: + name: + cost: 1 + editType: 3 + User Layer 24: + name: + cost: 1 + editType: 3 + User Layer 25: + name: + cost: 1 + editType: 3 + User Layer 26: + name: + cost: 1 + editType: 3 + User Layer 27: + name: + cost: 1 + editType: 3 + User Layer 28: + name: + cost: 1 + editType: 3 diff --git a/unity/NativeDialogPlugin/ProjectSettings/PackageManagerSettings.asset b/unity/NativeDialogPlugin/ProjectSettings/PackageManagerSettings.asset new file mode 100644 index 0000000..be4a797 --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/PackageManagerSettings.asset @@ -0,0 +1,43 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + 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: 13964, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_EnablePreviewPackages: 0 + m_EnablePackageDependencies: 0 + m_AdvancedSettingsExpanded: 1 + m_ScopedRegistriesSettingsExpanded: 1 + oneTimeWarningShown: 0 + m_Registries: + - m_Id: main + m_Name: + m_Url: https://packages.unity.com + m_Scopes: [] + m_IsDefault: 1 + m_Capabilities: 7 + m_UserSelectedRegistryName: + m_UserAddingNewScopedRegistry: 0 + m_RegistryInfoDraft: + m_ErrorMessage: + m_Original: + m_Id: + m_Name: + m_Url: + m_Scopes: [] + m_IsDefault: 0 + m_Capabilities: 0 + m_Modified: 0 + m_Name: + m_Url: + m_Scopes: + - + m_SelectedScopeIndex: 0 diff --git a/unity/NativeDialogPlugin/ProjectSettings/PresetManager.asset b/unity/NativeDialogPlugin/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..67a94da --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/PresetManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_DefaultPresets: {} diff --git a/unity/NativeDialogPlugin/ProjectSettings/ProjectVersion.txt b/unity/NativeDialogPlugin/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..24993f7 --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 2020.3.23f1 +m_EditorVersionWithRevision: 2020.3.23f1 (c5d91304a876) diff --git a/unity/NativeDialogPlugin/ProjectSettings/UnityConnectSettings.asset b/unity/NativeDialogPlugin/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..6125b30 --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/unity/NativeDialogPlugin/ProjectSettings/VFXManager.asset b/unity/NativeDialogPlugin/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..46f38e1 --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/VFXManager.asset @@ -0,0 +1,14 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 + m_CompiledVersion: 0 + m_RuntimeVersion: 0 diff --git a/unity/NativeDialogPlugin/ProjectSettings/VersionControlSettings.asset b/unity/NativeDialogPlugin/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..dca2881 --- /dev/null +++ b/unity/NativeDialogPlugin/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 From f0e33861b9dbe76e1bf3e4fc47d5ae666ed3fe09 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:05:38 +0900 Subject: [PATCH 2/8] Remove unneeded packages --- .../NativeDialogPlugin/Packages/manifest.json | 13 +- .../Packages/packages-lock.json | 121 +----------------- 2 files changed, 2 insertions(+), 132 deletions(-) diff --git a/unity/NativeDialogPlugin/Packages/manifest.json b/unity/NativeDialogPlugin/Packages/manifest.json index 85c4794..9c42540 100644 --- a/unity/NativeDialogPlugin/Packages/manifest.json +++ b/unity/NativeDialogPlugin/Packages/manifest.json @@ -1,19 +1,8 @@ { "dependencies": { - "com.unity.2d.sprite": "1.0.0", - "com.unity.2d.tilemap": "1.0.0", - "com.unity.ads": "3.7.5", - "com.unity.analytics": "3.6.11", - "com.unity.collab-proxy": "1.15.1", - "com.unity.ide.rider": "2.0.7", - "com.unity.ide.visualstudio": "2.0.11", "com.unity.ide.vscode": "1.2.4", - "com.unity.purchasing": "4.0.3", - "com.unity.test-framework": "1.1.29", - "com.unity.textmeshpro": "3.0.6", - "com.unity.timeline": "1.4.8", + "com.unity.test-framework": "1.1.30", "com.unity.ugui": "1.0.0", - "com.unity.xr.legacyinputhelpers": "2.1.8", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/unity/NativeDialogPlugin/Packages/packages-lock.json b/unity/NativeDialogPlugin/Packages/packages-lock.json index 8e81a14..692f0a4 100644 --- a/unity/NativeDialogPlugin/Packages/packages-lock.json +++ b/unity/NativeDialogPlugin/Packages/packages-lock.json @@ -1,45 +1,5 @@ { "dependencies": { - "com.unity.2d.sprite": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.2d.tilemap": { - "version": "1.0.0", - "depth": 0, - "source": "builtin", - "dependencies": {} - }, - "com.unity.ads": { - "version": "3.7.5", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ugui": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.analytics": { - "version": "3.6.11", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ugui": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.collab-proxy": { - "version": "1.15.1", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.nuget.newtonsoft-json": "2.0.0", - "com.unity.services.core": "1.0.1" - }, - "url": "https://packages.unity.com" - }, "com.unity.ext.nunit": { "version": "1.0.6", "depth": 1, @@ -47,24 +7,6 @@ "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.ide.rider": { - "version": "2.0.7", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.test-framework": "1.1.1" - }, - "url": "https://packages.unity.com" - }, - "com.unity.ide.visualstudio": { - "version": "2.0.11", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.test-framework": "1.1.9" - }, - "url": "https://packages.unity.com" - }, "com.unity.ide.vscode": { "version": "1.2.4", "depth": 0, @@ -72,38 +14,8 @@ "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.nuget.newtonsoft-json": { - "version": "2.0.0", - "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, - "com.unity.purchasing": { - "version": "4.0.3", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ugui": "1.0.0", - "com.unity.modules.unityanalytics": "1.0.0", - "com.unity.modules.unitywebrequest": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0", - "com.unity.modules.androidjni": "1.0.0", - "com.unity.services.core": "1.0.1" - }, - "url": "https://packages.unity.com" - }, - "com.unity.services.core": { - "version": "1.0.1", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.modules.unitywebrequest": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.test-framework": { - "version": "1.1.29", + "version": "1.1.30", "depth": 0, "source": "registry", "dependencies": { @@ -113,27 +25,6 @@ }, "url": "https://packages.unity.com" }, - "com.unity.textmeshpro": { - "version": "3.0.6", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.ugui": "1.0.0" - }, - "url": "https://packages.unity.com" - }, - "com.unity.timeline": { - "version": "1.4.8", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.modules.director": "1.0.0", - "com.unity.modules.animation": "1.0.0", - "com.unity.modules.audio": "1.0.0", - "com.unity.modules.particlesystem": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.ugui": { "version": "1.0.0", "depth": 0, @@ -143,16 +34,6 @@ "com.unity.modules.imgui": "1.0.0" } }, - "com.unity.xr.legacyinputhelpers": { - "version": "2.1.8", - "depth": 0, - "source": "registry", - "dependencies": { - "com.unity.modules.vr": "1.0.0", - "com.unity.modules.xr": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.modules.ai": { "version": "1.0.0", "depth": 0, From 68460e8ffc05b1dd39e89a7429f3327c0cd34be8 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:05:51 +0900 Subject: [PATCH 3/8] Bump year in license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 73efac9..fb4e318 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013 Koki Ibukuro +Copyright (c) 2021 Koki Ibukuro Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From bc762d33c2b00e9faa2f078af06f81aae3df256c Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:21:44 +0900 Subject: [PATCH 4/8] Migrate sample scene to Unity uGUI --- .../Assets/NativeDialogSample.cs | 84 ++-- .../Assets/NativeDialogSample.unity | 435 +++++++++++++++++- .../ProjectSettings/EditorBuildSettings.asset | 4 +- 3 files changed, 483 insertions(+), 40 deletions(-) diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs index add8f13..1564fb7 100644 --- a/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs @@ -3,55 +3,67 @@ public class NativeDialogSample : MonoBehaviour { - public string decideLabel; - public string cancelLabel; - public string closeLabel; + [SerializeField] private string decideLabel = "Decide"; + [SerializeField] private string cancelLabel = "Cancel"; + [SerializeField] private string closeLabel = "Close"; - void Start() + private void Start() { DialogManager.Instance.SetLabel(decideLabel, cancelLabel, closeLabel); } - void OnGUI() + #region Invoked from Unity GUI + + public void ShowSelectDialog() { - if (GUILayout.Button("aaa", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + const string message = "A simple select dialog"; + DialogManager.Instance.ShowSelectDialog(message, (bool result) => { - DialogManager.Instance.ShowSelectDialog("aaa", (bool result) => - { - Debug.Log("aaa" + result); - }); - } - if (GUILayout.Button("bbb", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + Debug.Log($"{result}: {message}"); + }); + } + + public void ShowSelectDialogWithTitle() + { + const string title = "A title"; + const string message = "A message for select dialog"; + DialogManager.Instance.ShowSelectDialog(title, message, (bool result) => { - DialogManager.Instance.ShowSelectDialog("b title", "bbb", (bool result) => - { - Debug.Log("bbb" + result); - }); - } - if (GUILayout.Button("ccc", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + Debug.Log($"{result}: {title} / {message}"); + }); + } + + public void ShowSubmitDialog() + { + const string message = "A simple submit dialog"; + DialogManager.Instance.ShowSubmitDialog(message, (bool result) => { - DialogManager.Instance.ShowSubmitDialog("ccc", (bool result) => - { - Debug.Log("ccc"); - }); - } - if (GUILayout.Button("ddd", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + Debug.Log($"{result}: {message}"); + }); + } + + public void ShowSubmitDialogWithTitle() + { + const string title = "A title"; + const string message = "A message for submit dialog"; + DialogManager.Instance.ShowSubmitDialog(title, message, (bool result) => { - DialogManager.Instance.ShowSubmitDialog("d title", "ddd", (bool result) => - { - Debug.Log("ddd"); - }); - } - if (GUILayout.Button("eee auto dissmiss", GUILayout.MinWidth(200), GUILayout.MinHeight(100))) + Debug.Log($"{result}: {title} / {message}"); + }); + } + + public void ShowDialogWithAutoDissmiss() + { + const string message = "A dialog with auto dismiss"; + int id = DialogManager.Instance.ShowSelectDialog(message, (bool result) => { - int id = DialogManager.Instance.ShowSelectDialog("eee", (bool result) => - { - Debug.Log("eee" + result); - }); - StartCoroutine(Dissmiss(id, 3f)); - } + Debug.Log($"{result}: {message}"); + }); + StartCoroutine(Dissmiss(id, 3f)); } + #endregion // Invoked from Unity GUI + private IEnumerator Dissmiss(int id, float time) { yield return new WaitForSeconds(time); diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity index a886b64..b03c91c 100644 --- a/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity @@ -124,6 +124,185 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &266531760 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 266531764} + - component: {fileID: 266531763} + - component: {fileID: 266531762} + - component: {fileID: 266531761} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &266531761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 266531760} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &266531762 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 266531760} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1080, y: 1920} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &266531763 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 266531760} + 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_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &266531764 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 266531760} + 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_Children: + - {fileID: 1405526418} + m_Father: {fileID: 0} + m_RootOrder: 1 + 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!1 &540590710 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 540590711} + - component: {fileID: 540590713} + - component: {fileID: 540590712} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &540590711 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 540590710} + 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_Children: [] + m_Father: {fileID: 1796505068} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &540590712 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 540590710} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 14 + m_MaxSize: 80 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Button +--- !u!222 &540590713 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 540590710} + m_CullTransparentMesh: 1 --- !u!1 &969519936 GameObject: m_ObjectHideFlags: 0 @@ -168,8 +347,8 @@ Camera: m_GameObject: {fileID: 969519936} m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.16981131, g: 0.16981131, b: 0.16981131, a: 0.019607844} m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 @@ -245,7 +424,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1045089954 MonoBehaviour: @@ -262,3 +441,253 @@ MonoBehaviour: decideLabel: "\u306F\u3044" cancelLabel: "\u3044\u3044\u3048" closeLabel: "\u9589\u3058\u308B" +--- !u!1 &1405526417 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1405526418} + - component: {fileID: 1405526419} + m_Layer: 5 + m_Name: VList + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1405526418 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1405526417} + 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_Children: + - {fileID: 1796505068} + m_Father: {fileID: 266531764} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -200, y: -200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1405526419 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1405526417} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1796505067 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1796505068} + - component: {fileID: 1796505071} + - component: {fileID: 1796505070} + - component: {fileID: 1796505069} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1796505068 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1796505067} + 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_Children: + - {fileID: 540590711} + m_Father: {fileID: 1405526418} + m_RootOrder: 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.5, y: 0.5} +--- !u!114 &1796505069 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1796505067} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1796505070} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1796505070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1796505067} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1796505071 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1796505067} + m_CullTransparentMesh: 1 +--- !u!1 &2086537873 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2086537876} + - component: {fileID: 2086537875} + - component: {fileID: 2086537874} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2086537874 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2086537873} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &2086537875 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2086537873} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &2086537876 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2086537873} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/unity/NativeDialogPlugin/ProjectSettings/EditorBuildSettings.asset b/unity/NativeDialogPlugin/ProjectSettings/EditorBuildSettings.asset index 7b212f0..c721ff4 100644 --- a/unity/NativeDialogPlugin/ProjectSettings/EditorBuildSettings.asset +++ b/unity/NativeDialogPlugin/ProjectSettings/EditorBuildSettings.asset @@ -6,4 +6,6 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 1 - path: Assets/test.unity + path: Assets/NativeDialogSample.unity + guid: a1faf9c15faa74cb88a6f2414049432a + m_configObjects: {} From ba4093a453eb9ebd3a31378735f88c08cec8ebcf Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:26:51 +0900 Subject: [PATCH 5/8] Connect buttons event with code --- .../Assets/NativeDialogSample.unity | 970 +++++++++++++++++- 1 file changed, 917 insertions(+), 53 deletions(-) diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity index b03c91c..86528a9 100644 --- a/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSample.unity @@ -224,6 +224,351 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!1 &364165587 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 364165588} + - component: {fileID: 364165591} + - component: {fileID: 364165590} + - component: {fileID: 364165589} + m_Layer: 5 + m_Name: Button - ShowDialogWithAutoDissmiss + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &364165588 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 364165587} + 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_Children: + - {fileID: 440667842} + m_Father: {fileID: 1405526418} + m_RootOrder: 4 + 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.5, y: 0.5} +--- !u!114 &364165589 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 364165587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 364165590} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1045089954} + m_TargetAssemblyTypeName: NativeDialogSample, Assembly-CSharp + m_MethodName: ShowDialogWithAutoDissmiss + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &364165590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 364165587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &364165591 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 364165587} + m_CullTransparentMesh: 1 +--- !u!1 &440667841 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 440667842} + - component: {fileID: 440667844} + - component: {fileID: 440667843} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &440667842 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 440667841} + 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_Children: [] + m_Father: {fileID: 364165588} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &440667843 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 440667841} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 14 + m_MaxSize: 60 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Dialog with Auto Dissmiss +--- !u!222 &440667844 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 440667841} + m_CullTransparentMesh: 1 +--- !u!1 &459833000 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 459833001} + - component: {fileID: 459833004} + - component: {fileID: 459833003} + - component: {fileID: 459833002} + m_Layer: 5 + m_Name: Button - ShowSelectDialogWithTitle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &459833001 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459833000} + 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_Children: + - {fileID: 1959184771} + m_Father: {fileID: 1405526418} + m_RootOrder: 1 + 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.5, y: 0.5} +--- !u!114 &459833002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459833000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 459833003} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1045089954} + m_TargetAssemblyTypeName: NativeDialogSample, Assembly-CSharp + m_MethodName: ShowSelectDialogWithTitle + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &459833003 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459833000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &459833004 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459833000} + m_CullTransparentMesh: 1 --- !u!1 &540590710 GameObject: m_ObjectHideFlags: 0 @@ -287,14 +632,14 @@ MonoBehaviour: m_FontStyle: 0 m_BestFit: 1 m_MinSize: 14 - m_MaxSize: 80 + m_MaxSize: 60 m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 0 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Button + m_Text: Select Dialog --- !u!222 &540590713 CanvasRenderer: m_ObjectHideFlags: 0 @@ -303,6 +648,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 540590710} m_CullTransparentMesh: 1 +--- !u!1 &638595259 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 638595260} + - component: {fileID: 638595262} + - component: {fileID: 638595261} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &638595260 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 638595259} + 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_Children: [] + m_Father: {fileID: 1725782359} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &638595261 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 638595259} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 14 + m_MaxSize: 60 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Submit Dialog with Title +--- !u!222 &638595262 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 638595259} + m_CullTransparentMesh: 1 --- !u!1 &969519936 GameObject: m_ObjectHideFlags: 0 @@ -389,13 +813,259 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 969519936} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1045089952 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1045089953} + - component: {fileID: 1045089954} + m_Layer: 0 + m_Name: Sample + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1045089953 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1045089952} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1045089954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1045089952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9cee4dadaa0d847beaaf529b100028ec, type: 3} + m_Name: + m_EditorClassIdentifier: + decideLabel: "\u306F\u3044" + cancelLabel: "\u3044\u3044\u3048" + closeLabel: "\u9589\u3058\u308B" +--- !u!1 &1164248999 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1164249000} + - component: {fileID: 1164249003} + - component: {fileID: 1164249002} + - component: {fileID: 1164249001} + m_Layer: 5 + m_Name: Button - ShowSubmitDialog + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1164249000 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1164248999} + 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_Children: + - {fileID: 1601976348} + m_Father: {fileID: 1405526418} + m_RootOrder: 2 + 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.5, y: 0.5} +--- !u!114 &1164249001 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1164248999} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1164249002} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1045089954} + m_TargetAssemblyTypeName: NativeDialogSample, Assembly-CSharp + m_MethodName: ShowSubmitDialog + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1164249002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1164248999} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1164249003 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1164248999} + m_CullTransparentMesh: 1 +--- !u!1 &1405526417 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1405526418} + - component: {fileID: 1405526419} + m_Layer: 5 + m_Name: VList + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1405526418 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1405526417} + 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_Children: [] - m_Father: {fileID: 0} + m_Children: + - {fileID: 1796505068} + - {fileID: 459833001} + - {fileID: 1164249000} + - {fileID: 1725782359} + - {fileID: 364165588} + m_Father: {fileID: 266531764} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1045089952 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -200, y: -200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1405526419 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1405526417} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 60 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1601976347 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -403,45 +1073,78 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1045089953} - - component: {fileID: 1045089954} - m_Layer: 0 - m_Name: Sample + - component: {fileID: 1601976348} + - component: {fileID: 1601976350} + - component: {fileID: 1601976349} + m_Layer: 5 + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1045089953 -Transform: +--- !u!224 &1601976348 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045089952} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 1601976347} + 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_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 + m_Father: {fileID: 1164249000} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1045089954 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1601976349 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1045089952} + m_GameObject: {fileID: 1601976347} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9cee4dadaa0d847beaaf529b100028ec, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: - decideLabel: "\u306F\u3044" - cancelLabel: "\u3044\u3044\u3048" - closeLabel: "\u9589\u3058\u308B" ---- !u!1 &1405526417 + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 14 + m_MaxSize: 60 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Submit Dialog +--- !u!222 &1601976350 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1601976347} + m_CullTransparentMesh: 1 +--- !u!1 &1725782358 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -449,61 +1152,131 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1405526418} - - component: {fileID: 1405526419} + - component: {fileID: 1725782359} + - component: {fileID: 1725782362} + - component: {fileID: 1725782361} + - component: {fileID: 1725782360} m_Layer: 5 - m_Name: VList + m_Name: Button - ShowSubmitDialogWithTitle m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1405526418 +--- !u!224 &1725782359 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1405526417} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 1725782358} + 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_Children: - - {fileID: 1796505068} - m_Father: {fileID: 266531764} - m_RootOrder: 0 + - {fileID: 638595260} + m_Father: {fileID: 1405526418} + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -200, y: -200} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1405526419 +--- !u!114 &1725782360 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1405526417} + m_GameObject: {fileID: 1725782358} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} m_Name: m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 4 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 1 - m_ChildControlHeight: 1 - m_ChildScaleWidth: 0 - m_ChildScaleHeight: 0 - m_ReverseArrangement: 0 + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1725782361} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1045089954} + m_TargetAssemblyTypeName: NativeDialogSample, Assembly-CSharp + m_MethodName: ShowSubmitDialogWithTitle + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1725782361 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1725782358} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1725782362 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1725782358} + m_CullTransparentMesh: 1 --- !u!1 &1796505067 GameObject: m_ObjectHideFlags: 0 @@ -517,7 +1290,7 @@ GameObject: - component: {fileID: 1796505070} - component: {fileID: 1796505069} m_Layer: 5 - m_Name: Button + m_Name: Button - ShowSelectDialog m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -586,7 +1359,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1796505070} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 1045089954} + m_TargetAssemblyTypeName: NativeDialogSample, Assembly-CSharp + m_MethodName: ShowSelectDialog + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!114 &1796505070 MonoBehaviour: m_ObjectHideFlags: 0 @@ -625,6 +1410,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1796505067} m_CullTransparentMesh: 1 +--- !u!1 &1959184770 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1959184771} + - component: {fileID: 1959184773} + - component: {fileID: 1959184772} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1959184771 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1959184770} + 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_Children: [] + m_Father: {fileID: 459833001} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1959184772 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1959184770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 14 + m_MaxSize: 60 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Select Dialog with Title +--- !u!222 &1959184773 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1959184770} + m_CullTransparentMesh: 1 --- !u!1 &2086537873 GameObject: m_ObjectHideFlags: 0 From 97dd7259677be72a3a1af16374f41d2a93fbfcdf Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:39:01 +0900 Subject: [PATCH 6/8] Change deprecated UNITY_IPHONE define --- .../Assets/Plugins/DialogManager.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs b/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs index adc0add..5d70f95 100644 --- a/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs +++ b/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs @@ -76,7 +76,7 @@ void OnGUI () { EditorDialog.Draw (); } - #elif UNITY_IPHONE + #elif UNITY_IOS [DllImport("__Internal")] private static extern int _showSelectDialog (string msg); [DllImport("__Internal")] @@ -103,7 +103,7 @@ public int ShowSelectDialog (string msg, Action del) id = cls.CallStatic("ShowSelectDialog", msg); _delegates.Add(id, del); } - #elif UNITY_IPHONE + #elif UNITY_IOS id = _showSelectDialog(msg); _delegates.Add(id, del); #endif @@ -120,7 +120,7 @@ public int ShowSelectDialog (string title, string msg, Action del) id = cls.CallStatic("ShowSelectTitleDialog", title, msg); _delegates.Add(id, del); } - #elif UNITY_IPHONE + #elif UNITY_IOS id = _showSelectTitleDialog(title, msg); _delegates.Add(id, del); #endif @@ -137,7 +137,7 @@ public int ShowSubmitDialog (string msg, Action del) id = cls.CallStatic("ShowSubmitDialog", msg); _delegates.Add(id, del); } - #elif UNITY_IPHONE + #elif UNITY_IOS id = _showSubmitDialog(msg); _delegates.Add(id, del); #endif @@ -154,7 +154,7 @@ public int ShowSubmitDialog (string title, string msg, Action del) id = cls.CallStatic("ShowSubmitTitleDialog", title, msg); _delegates.Add(id, del); } - #elif UNITY_IPHONE + #elif UNITY_IOS id = _showSubmitTitleDialog(title, msg); _delegates.Add(id, del); #endif @@ -168,7 +168,7 @@ public void DissmissDialog(int id) { using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { cls.CallStatic("DissmissDialog", id); } - #elif UNITY_IPHONE + #elif UNITY_IOS _dissmissDialog(id); #endif @@ -188,7 +188,7 @@ public void SetLabel(string decide, string cancel, string close) { using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { cls.CallStatic("SetLabel", decide, cancel, close); } - #elif UNITY_IPHONE + #elif UNITY_IOS _setLabel(decide, cancel, close); #endif From 15dd3bfe5afb53aa2b572247dff4d356fc037aec Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:39:12 +0900 Subject: [PATCH 7/8] Remove blank folder --- unity/NativeDialogPlugin/Assets/Resources.meta | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 unity/NativeDialogPlugin/Assets/Resources.meta diff --git a/unity/NativeDialogPlugin/Assets/Resources.meta b/unity/NativeDialogPlugin/Assets/Resources.meta deleted file mode 100644 index 8823d6e..0000000 --- a/unity/NativeDialogPlugin/Assets/Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8b015d02ed885434187be9a5dc17b314 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 620e53f020b631a327117ca37d79e659118e8894 Mon Sep 17 00:00:00 2001 From: Koki Ibukuro Date: Mon, 20 Dec 2021 23:49:09 +0900 Subject: [PATCH 8/8] Move core sources into UPM folder --- .../Assets/NativeDialogSample.cs | 1 + unity/NativeDialogPlugin/Assets/Plugins.meta | 5 - .../Assets/Plugins/DialogManager.cs | 276 ---------------- .../Android.meta | 0 .../Android/unitydialogplugin.jar | Bin .../Android/unitydialogplugin.jar.meta | 0 .../Runtime.meta | 8 + .../Runtime/DialogManager.cs | 298 ++++++++++++++++++ .../Runtime}/DialogManager.cs.meta | 0 .../Runtime/NativeDialog.asmdef | 3 + .../Runtime/NativeDialog.asmdef.meta | 7 + .../com.github.asus4.nativedialog}/iOS.meta | 0 .../iOS/UNDialogManager.h | 0 .../iOS/UNDialogManager.h.meta | 0 .../iOS/UNDialogManager.mm | 0 .../iOS/UNDialogManager.mm.meta | 0 .../package.json | 15 + .../package.json.meta | 7 + .../Packages/packages-lock.json | 6 + 19 files changed, 345 insertions(+), 281 deletions(-) delete mode 100644 unity/NativeDialogPlugin/Assets/Plugins.meta delete mode 100644 unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/Android.meta (100%) rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/Android/unitydialogplugin.jar (100%) rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/Android/unitydialogplugin.jar.meta (100%) create mode 100644 unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime.meta create mode 100644 unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog/Runtime}/DialogManager.cs.meta (100%) create mode 100644 unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef create mode 100644 unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef.meta rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/iOS.meta (100%) rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/iOS/UNDialogManager.h (100%) rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/iOS/UNDialogManager.h.meta (100%) rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/iOS/UNDialogManager.mm (100%) rename unity/NativeDialogPlugin/{Assets/Plugins => Packages/com.github.asus4.nativedialog}/iOS/UNDialogManager.mm.meta (100%) create mode 100644 unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json create mode 100644 unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json.meta diff --git a/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs index 1564fb7..4e5fbb9 100644 --- a/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs +++ b/unity/NativeDialogPlugin/Assets/NativeDialogSample.cs @@ -1,5 +1,6 @@ using UnityEngine; using System.Collections; +using NativeDialog; public class NativeDialogSample : MonoBehaviour { diff --git a/unity/NativeDialogPlugin/Assets/Plugins.meta b/unity/NativeDialogPlugin/Assets/Plugins.meta deleted file mode 100644 index e301642..0000000 --- a/unity/NativeDialogPlugin/Assets/Plugins.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 8dd53166824284dca971590e9d628ee9 -folderAsset: yes -DefaultImporter: - userData: diff --git a/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs b/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs deleted file mode 100644 index 5d70f95..0000000 --- a/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs +++ /dev/null @@ -1,276 +0,0 @@ -using UnityEngine; -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -/// -/// Popup Native Dialog -/// -public class DialogManager : MonoBehaviour -{ - - #region static Singleton - static DialogManager _instance; - - public static DialogManager Instance { - get { - if (_instance == null) { - // find if there is already DialogManager in the scene - _instance = GameObject.FindObjectOfType(); - - if(_instance == null) { - _instance = new GameObject ("DialogManager").AddComponent (); - } - - DontDestroyOnLoad (_instance.gameObject); - } - return _instance; - } - } - #endregion - - #region members - Dictionary> _delegates; - #endregion - - #region Lyfecycles - void Awake () - { - if(_instance == null) - { - //If I am the first instance, make me the Singleton - _instance = this; - DontDestroyOnLoad(this); - - _delegates = new Dictionary> (); - - // set default label - SetLabel("YES", "NO", "CLOSE"); - - } - else - { - //If a Singleton already exists and you find - //another reference in scene, destroy it! - if(this != _instance) - { - Destroy(this.gameObject); - } - } - } - - void OnDestroy () - { - if (_delegates != null) { - _delegates.Clear (); - _delegates = null; - } - } - #endregion - - - - #if UNITY_EDITOR - // only editor.. show dummy gui - void OnGUI () - { - EditorDialog.Draw (); - } - #elif UNITY_IOS - [DllImport("__Internal")] - private static extern int _showSelectDialog (string msg); - [DllImport("__Internal")] - private static extern int _showSelectTitleDialog (string title, string msg); - [DllImport("__Internal")] - private static extern int _showSubmitDialog (string msg); - [DllImport("__Internal")] - private static extern int _showSubmitTitleDialog (string title, string msg); - [DllImport("__Internal")] - private static extern void _dissmissDialog (int id); - [DllImport("__Internal")] - private static extern void _setLabel(string decide, string cancel, string close); - #endif - - - - public int ShowSelectDialog (string msg, Action del) - { - int id; - #if UNITY_EDITOR - id = 0; - #elif UNITY_ANDROID - using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { - id = cls.CallStatic("ShowSelectDialog", msg); - _delegates.Add(id, del); - } - #elif UNITY_IOS - id = _showSelectDialog(msg); - _delegates.Add(id, del); - #endif - return id; - } - - public int ShowSelectDialog (string title, string msg, Action del) - { - int id; - #if UNITY_EDITOR - id = 0; - #elif UNITY_ANDROID - using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { - id = cls.CallStatic("ShowSelectTitleDialog", title, msg); - _delegates.Add(id, del); - } - #elif UNITY_IOS - id = _showSelectTitleDialog(title, msg); - _delegates.Add(id, del); - #endif - return id; - } - - public int ShowSubmitDialog (string msg, Action del) - { - int id; - #if UNITY_EDITOR - id = 0; - #elif UNITY_ANDROID - using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { - id = cls.CallStatic("ShowSubmitDialog", msg); - _delegates.Add(id, del); - } - #elif UNITY_IOS - id = _showSubmitDialog(msg); - _delegates.Add(id, del); - #endif - return id; - } - - public int ShowSubmitDialog (string title, string msg, Action del) - { - int id; - #if UNITY_EDITOR - id = 0; - #elif UNITY_ANDROID - using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { - id = cls.CallStatic("ShowSubmitTitleDialog", title, msg); - _delegates.Add(id, del); - } - #elif UNITY_IOS - id = _showSubmitTitleDialog(title, msg); - _delegates.Add(id, del); - #endif - return id; - } - - public void DissmissDialog(int id) { - #if UNITY_EDITOR - - #elif UNITY_ANDROID - using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { - cls.CallStatic("DissmissDialog", id); - } - #elif UNITY_IOS - _dissmissDialog(id); - #endif - - if(_delegates.ContainsKey(id)) { - _delegates [id] (false); - _delegates.Remove (id); - } else { - Debug.LogWarning ("undefined id:" + id); - } - } - - public void SetLabel(string decide, string cancel, string close) { - - #if UNITY_EDITOR - - #elif UNITY_ANDROID - using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { - cls.CallStatic("SetLabel", decide, cancel, close); - } - #elif UNITY_IOS - _setLabel(decide, cancel, close); - #endif - - } - - #region Invoked from Native Plugin - public void OnSubmit (string idStr) - { - int id = int.Parse (idStr); - if (_delegates.ContainsKey (id)) { - _delegates [id] (true); - _delegates.Remove (id); - } else { - Debug.LogWarning ("undefined id:" + idStr); - } - } - - public void OnCancel (string idStr) - { - int id = int.Parse (idStr); - if (_delegates.ContainsKey (id)) { - _delegates [id] (false); - _delegates.Remove (id); - } else { - Debug.LogWarning ("undefined id:" + idStr); - } - } - #endregion - - #if UNITY_EDITOR - // this is test class for editor - class EditorDialog { - static int _TOTAL_ID; - - Rect _windowRect; - int _id; - string msg; - - public static void Draw () - { - - } - - public void _Draw () - { - int w = Screen.width; - int h = Screen.height; - - if (_windowRect.width == 0) { - _windowRect = new Rect (w * 0.1f, h / 2 - 300, w - w * 0.2f, 600); - } - _windowRect = GUILayout.Window (_TOTAL_ID, _windowRect, DoMyWindow, "My Window"); - } - - void DoMyWindow (int windowID) - { - GUILayout.Label ("lakdjfalskdjfalskdjfalk"); - GUILayout.BeginHorizontal (); - - if (GUILayout.Button ("NO")) { - - } - if (GUILayout.Button ("YES")) { - - } - GUILayout.EndHorizontal (); - } - - static public int ShowSelectDialog () - { - ++_TOTAL_ID; - return _TOTAL_ID; - } - - static public int ShowSubmitDialog () - { - ++_TOTAL_ID; - return _TOTAL_ID; - } - - } - #endif - -} - diff --git a/unity/NativeDialogPlugin/Assets/Plugins/Android.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Android.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/Android.meta rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Android.meta diff --git a/unity/NativeDialogPlugin/Assets/Plugins/Android/unitydialogplugin.jar b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Android/unitydialogplugin.jar similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/Android/unitydialogplugin.jar rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Android/unitydialogplugin.jar diff --git a/unity/NativeDialogPlugin/Assets/Plugins/Android/unitydialogplugin.jar.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Android/unitydialogplugin.jar.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/Android/unitydialogplugin.jar.meta rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Android/unitydialogplugin.jar.meta diff --git a/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime.meta new file mode 100644 index 0000000..1901fb6 --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0e2822285ebd54025a5d310a865bf06b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs new file mode 100644 index 0000000..bcadb74 --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs @@ -0,0 +1,298 @@ +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace NativeDialog +{ + /// + /// Popup Native Dialog + /// + public class DialogManager : MonoBehaviour + { + + #region static Singleton + static DialogManager _instance; + + public static DialogManager Instance + { + get + { + if (_instance == null) + { + // find if there is already DialogManager in the scene + _instance = GameObject.FindObjectOfType(); + + if (_instance == null) + { + _instance = new GameObject("DialogManager").AddComponent(); + } + + DontDestroyOnLoad(_instance.gameObject); + } + return _instance; + } + } + #endregion + + #region members + Dictionary> _delegates; + #endregion + + #region Lyfecycles + void Awake() + { + if (_instance == null) + { + //If I am the first instance, make me the Singleton + _instance = this; + DontDestroyOnLoad(this); + + _delegates = new Dictionary>(); + + // set default label + SetLabel("YES", "NO", "CLOSE"); + + } + else + { + //If a Singleton already exists and you find + //another reference in scene, destroy it! + if (this != _instance) + { + Destroy(this.gameObject); + } + } + } + + void OnDestroy() + { + if (_delegates != null) + { + _delegates.Clear(); + _delegates = null; + } + } + #endregion + + + +#if UNITY_EDITOR + // only editor.. show dummy gui + void OnGUI() + { + EditorDialog.Draw(); + } +#elif UNITY_IOS + [DllImport("__Internal")] + private static extern int _showSelectDialog (string msg); + [DllImport("__Internal")] + private static extern int _showSelectTitleDialog (string title, string msg); + [DllImport("__Internal")] + private static extern int _showSubmitDialog (string msg); + [DllImport("__Internal")] + private static extern int _showSubmitTitleDialog (string title, string msg); + [DllImport("__Internal")] + private static extern void _dissmissDialog (int id); + [DllImport("__Internal")] + private static extern void _setLabel(string decide, string cancel, string close); +#endif + + + + public int ShowSelectDialog(string msg, Action del) + { + int id; +#if UNITY_EDITOR + id = 0; +#elif UNITY_ANDROID + using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { + id = cls.CallStatic("ShowSelectDialog", msg); + _delegates.Add(id, del); + } +#elif UNITY_IOS + id = _showSelectDialog(msg); + _delegates.Add(id, del); +#endif + return id; + } + + public int ShowSelectDialog(string title, string msg, Action del) + { + int id; +#if UNITY_EDITOR + id = 0; +#elif UNITY_ANDROID + using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { + id = cls.CallStatic("ShowSelectTitleDialog", title, msg); + _delegates.Add(id, del); + } +#elif UNITY_IOS + id = _showSelectTitleDialog(title, msg); + _delegates.Add(id, del); +#endif + return id; + } + + public int ShowSubmitDialog(string msg, Action del) + { + int id; +#if UNITY_EDITOR + id = 0; +#elif UNITY_ANDROID + using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { + id = cls.CallStatic("ShowSubmitDialog", msg); + _delegates.Add(id, del); + } +#elif UNITY_IOS + id = _showSubmitDialog(msg); + _delegates.Add(id, del); +#endif + return id; + } + + public int ShowSubmitDialog(string title, string msg, Action del) + { + int id; +#if UNITY_EDITOR + id = 0; +#elif UNITY_ANDROID + using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { + id = cls.CallStatic("ShowSubmitTitleDialog", title, msg); + _delegates.Add(id, del); + } +#elif UNITY_IOS + id = _showSubmitTitleDialog(title, msg); + _delegates.Add(id, del); +#endif + return id; + } + + public void DissmissDialog(int id) + { +#if UNITY_EDITOR + +#elif UNITY_ANDROID + using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { + cls.CallStatic("DissmissDialog", id); + } +#elif UNITY_IOS + _dissmissDialog(id); +#endif + + if (_delegates.ContainsKey(id)) + { + _delegates[id](false); + _delegates.Remove(id); + } + else + { + Debug.LogWarning("undefined id:" + id); + } + } + + public void SetLabel(string decide, string cancel, string close) + { + +#if UNITY_EDITOR + +#elif UNITY_ANDROID + using (AndroidJavaClass cls = new AndroidJavaClass("unity.plugins.dialog.DialogManager")) { + cls.CallStatic("SetLabel", decide, cancel, close); + } +#elif UNITY_IOS + _setLabel(decide, cancel, close); +#endif + + } + + #region Invoked from Native Plugin + public void OnSubmit(string idStr) + { + int id = int.Parse(idStr); + if (_delegates.ContainsKey(id)) + { + _delegates[id](true); + _delegates.Remove(id); + } + else + { + Debug.LogWarning("undefined id:" + idStr); + } + } + + public void OnCancel(string idStr) + { + int id = int.Parse(idStr); + if (_delegates.ContainsKey(id)) + { + _delegates[id](false); + _delegates.Remove(id); + } + else + { + Debug.LogWarning("undefined id:" + idStr); + } + } + #endregion + +#if UNITY_EDITOR + // this is test class for editor + class EditorDialog + { + static int _TOTAL_ID; + + Rect _windowRect; + int _id; + string msg; + + public static void Draw() + { + + } + + public void _Draw() + { + int w = Screen.width; + int h = Screen.height; + + if (_windowRect.width == 0) + { + _windowRect = new Rect(w * 0.1f, h / 2 - 300, w - w * 0.2f, 600); + } + _windowRect = GUILayout.Window(_TOTAL_ID, _windowRect, DoMyWindow, "My Window"); + } + + void DoMyWindow(int windowID) + { + GUILayout.Label("lakdjfalskdjfalskdjfalk"); + GUILayout.BeginHorizontal(); + + if (GUILayout.Button("NO")) + { + + } + if (GUILayout.Button("YES")) + { + + } + GUILayout.EndHorizontal(); + } + + static public int ShowSelectDialog() + { + ++_TOTAL_ID; + return _TOTAL_ID; + } + + static public int ShowSubmitDialog() + { + ++_TOTAL_ID; + return _TOTAL_ID; + } + + } +#endif + + } +} diff --git a/unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/DialogManager.cs.meta rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/DialogManager.cs.meta diff --git a/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef new file mode 100644 index 0000000..ae96734 --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef @@ -0,0 +1,3 @@ +{ + "name": "com.github.asus4.nativedialog" +} diff --git a/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef.meta new file mode 100644 index 0000000..15b51a5 --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/Runtime/NativeDialog.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c8b120a9164c64123ade02f268e8a469 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/NativeDialogPlugin/Assets/Plugins/iOS.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/iOS.meta rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS.meta diff --git a/unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.h b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.h similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.h rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.h diff --git a/unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.h.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.h.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.h.meta rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.h.meta diff --git a/unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.mm b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.mm similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.mm rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.mm diff --git a/unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.mm.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.mm.meta similarity index 100% rename from unity/NativeDialogPlugin/Assets/Plugins/iOS/UNDialogManager.mm.meta rename to unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/iOS/UNDialogManager.mm.meta diff --git a/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json new file mode 100644 index 0000000..7a9c81c --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json @@ -0,0 +1,15 @@ +{ + "name": "com.github.asus4.nativedialog", + "displayName": "Native Dialog", + "author": "Koki Ibukuro", + "description": "Native Dialog Plugin for Unity", + "keywords": [ + "unity" + ], + "license": "SEE LICENSE IN LICENSE", + "unity": "2020.3", + "unityRelease": "0f1", + "version": "1.0.0", + "type": "library", + "hideInEditor": false + } \ No newline at end of file diff --git a/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json.meta b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json.meta new file mode 100644 index 0000000..2b2005f --- /dev/null +++ b/unity/NativeDialogPlugin/Packages/com.github.asus4.nativedialog/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: abe9f602ee94147a193fd8a59f903cee +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity/NativeDialogPlugin/Packages/packages-lock.json b/unity/NativeDialogPlugin/Packages/packages-lock.json index 692f0a4..d2bee09 100644 --- a/unity/NativeDialogPlugin/Packages/packages-lock.json +++ b/unity/NativeDialogPlugin/Packages/packages-lock.json @@ -1,5 +1,11 @@ { "dependencies": { + "com.github.asus4.nativedialog": { + "version": "file:com.github.asus4.nativedialog", + "depth": 0, + "source": "embedded", + "dependencies": {} + }, "com.unity.ext.nunit": { "version": "1.0.6", "depth": 1,