pertama semua
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 138607dc521ec40199ab65b468c497dd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+838
@@ -0,0 +1,838 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6745020197822235005
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5942909820084221446}
|
||||
- component: {fileID: 1356233151855999379}
|
||||
- component: {fileID: 2971098080083335697}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5942909820084221446
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6745020197822235005}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6456697944676594922}
|
||||
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!222 &1356233151855999379
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6745020197822235005}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2971098080083335697
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6745020197822235005}
|
||||
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: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Message Flutter
|
||||
--- !u!1 &7291290396156464719
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7291290396156464704}
|
||||
- component: {fileID: 7291290396156464706}
|
||||
- component: {fileID: 7291290396156464705}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7291290396156464704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396156464719}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7291290396553264006}
|
||||
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!222 &7291290396156464706
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396156464719}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7291290396156464705
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396156464719}
|
||||
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: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Next Screen
|
||||
--- !u!1 &7291290396373430111
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7291290396373430096}
|
||||
- component: {fileID: 7291290396373430099}
|
||||
- component: {fileID: 7291290396373430098}
|
||||
- component: {fileID: 7291290396373430097}
|
||||
m_Layer: 5
|
||||
m_Name: Button (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7291290396373430096
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396373430111}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7291290397084913335}
|
||||
m_Father: {fileID: 7291290397388395908}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5796701, y: 0.88630265}
|
||||
m_AnchorMax: {x: 0.6906701, y: 0.9480001}
|
||||
m_AnchoredPosition: {x: -14, y: 1.5}
|
||||
m_SizeDelta: {x: 2.065918, y: 0.809021}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7291290396373430099
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396373430111}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7291290396373430098
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396373430111}
|
||||
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!114 &7291290396373430097
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396373430111}
|
||||
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: 7291290396373430098}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1150292537242516124}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: messengerFlutter
|
||||
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!1 &7291290396553264005
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7291290396553264006}
|
||||
- component: {fileID: 7291290396553263225}
|
||||
- component: {fileID: 7291290396553263224}
|
||||
- component: {fileID: 7291290396553264007}
|
||||
m_Layer: 5
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7291290396553264006
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396553264005}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7291290396156464704}
|
||||
m_Father: {fileID: 7291290397388395908}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.3196701, y: 0.88630265}
|
||||
m_AnchorMax: {x: 0.418, y: 0.9480001}
|
||||
m_AnchoredPosition: {x: -0.5, y: 1}
|
||||
m_SizeDelta: {x: 29.065918, y: -0.190979}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7291290396553263225
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396553264005}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7291290396553263224
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396553264005}
|
||||
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!114 &7291290396553264007
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396553264005}
|
||||
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: 7291290396553263224}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1150292537242516124}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: loadScene
|
||||
m_Mode: 3
|
||||
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!1 &7291290396675946414
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7291290396675946402}
|
||||
- component: {fileID: 7291290396675946401}
|
||||
- component: {fileID: 7291290396675946400}
|
||||
- component: {fileID: 7291290396675946415}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas_cool
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7291290396675946402
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396675946414}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7291290397388395908}
|
||||
m_Father: {fileID: 0}
|
||||
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, y: 0}
|
||||
--- !u!223 &7291290396675946401
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396675946414}
|
||||
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_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &7291290396675946400
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396675946414}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &7291290396675946415
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290396675946414}
|
||||
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!1 &7291290397084913334
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7291290397084913335}
|
||||
- component: {fileID: 7291290397084913321}
|
||||
- component: {fileID: 7291290397084913320}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7291290397084913335
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397084913334}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7291290396373430096}
|
||||
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!222 &7291290397084913321
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397084913334}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7291290397084913320
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397084913334}
|
||||
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: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Message Flutter
|
||||
--- !u!1 &7291290397388395907
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7291290397388395908}
|
||||
- component: {fileID: 7291290397388395910}
|
||||
- component: {fileID: 7291290397388395909}
|
||||
- component: {fileID: 1150292537242516124}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7291290397388395908
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397388395907}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7291290396553264006}
|
||||
- {fileID: 7291290396373430096}
|
||||
- {fileID: 6456697944676594922}
|
||||
m_Father: {fileID: 7291290396675946402}
|
||||
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!222 &7291290397388395910
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397388395907}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7291290397388395909
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397388395907}
|
||||
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: 0.392}
|
||||
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: 10907, 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!114 &1150292537242516124
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7291290397388395907}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 42390a6695e9d4d4f942a004ce0bd8d9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7603699748846054021
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6456697944676594922}
|
||||
- component: {fileID: 1231182898335186167}
|
||||
- component: {fileID: 2538987442614545673}
|
||||
- component: {fileID: 6868688753829550430}
|
||||
m_Layer: 5
|
||||
m_Name: Button (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6456697944676594922
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7603699748846054021}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5942909820084221446}
|
||||
m_Father: {fileID: 7291290397388395908}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: -1, y: 48.5}
|
||||
m_SizeDelta: {x: 120.06592, y: 33.80902}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1231182898335186167
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7603699748846054021}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2538987442614545673
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7603699748846054021}
|
||||
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!114 &6868688753829550430
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7603699748846054021}
|
||||
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: 2538987442614545673}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: LoadScene
|
||||
m_Mode: 3
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 2
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb9e458338d464183be39dc9376b06ca
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6039031815447326934
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6039031815447326929}
|
||||
- component: {fileID: 6039031815447326928}
|
||||
- component: {fileID: 6039031815447326935}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6039031815447326929
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6039031815447326934}
|
||||
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: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6039031815447326928
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6039031815447326934}
|
||||
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!114 &6039031815447326935
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6039031815447326934}
|
||||
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
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3594d1ae1a27a44ef9d3d0196cdd08d3
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using FlutterUnityIntegration;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
gameObject.AddComponent<UnityMessageManager>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{ }
|
||||
|
||||
void HandleWebFnCall(String action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case "pause":
|
||||
Time.timeScale = 0;
|
||||
break;
|
||||
case "resume":
|
||||
Time.timeScale = 1;
|
||||
break;
|
||||
case "unload":
|
||||
Application.Unload();
|
||||
break;
|
||||
case "quit":
|
||||
Application.Quit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25e2e19e6317942ae86eed73cec6b312
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using FlutterUnityIntegration;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using System.Globalization;
|
||||
|
||||
public class Rotate : MonoBehaviour, IEventSystemHandler
|
||||
{
|
||||
[SerializeField]
|
||||
Vector3 RotateAmount;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
RotateAmount = new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
gameObject.transform.Rotate(RotateAmount * Time.deltaTime * 120);
|
||||
|
||||
for (int i = 0; i < Input.touchCount; ++i)
|
||||
{
|
||||
if (Input.GetTouch(i).phase.Equals(TouchPhase.Began))
|
||||
{
|
||||
var hit = new RaycastHit();
|
||||
|
||||
Ray ray = Camera.main.ScreenPointToRay(Input.GetTouch(i).position);
|
||||
|
||||
if (Physics.Raycast(ray, out hit))
|
||||
{
|
||||
// This method is used to send data to Flutter
|
||||
UnityMessageManager.Instance.SendMessageToFlutter("The cube feels touched.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This method is called from Flutter
|
||||
public void SetRotationSpeed(String message)
|
||||
{
|
||||
float value = float.Parse(message , CultureInfo.InvariantCulture.NumberFormat);
|
||||
RotateAmount = new Vector3(value, value, value);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 463607cc3fa8d4e6eb8ee6a99700b297
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using FlutterUnityIntegration;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneLoader : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
// mMessenger = new UnityMessageManager();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void LoadScene(int idx)
|
||||
{
|
||||
Debug.Log("scene = " + idx);
|
||||
SceneManager.LoadScene(idx, LoadSceneMode.Single);
|
||||
}
|
||||
|
||||
public void MessengerFlutter()
|
||||
{
|
||||
|
||||
UnityMessageManager.Instance.SendMessageToFlutter("Hey man");
|
||||
}
|
||||
|
||||
public void SwitchNative()
|
||||
{
|
||||
UnityMessageManager.Instance.ShowHostMainWindow();
|
||||
}
|
||||
|
||||
public void UnloadNative()
|
||||
{
|
||||
UnityMessageManager.Instance.UnloadMainWindow();
|
||||
}
|
||||
|
||||
public void QuitNative()
|
||||
{
|
||||
UnityMessageManager.Instance.QuitUnityWindow();
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42390a6695e9d4d4f942a004ce0bd8d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebfb8b6035f5d4ebcb169cc3f905cfa0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+1330
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93c501e08eb4d4ac2a924b592f00449b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,798 @@
|
||||
%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.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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: 170076734}
|
||||
m_IndirectSpecularColor: {r: 0.18028352, g: 0.22571376, b: 0.30692244, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
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: 2
|
||||
m_BakeResolution: 10
|
||||
m_AtlasSize: 512
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 256
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
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_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
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.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &170076733
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 170076735}
|
||||
- component: {fileID: 170076734}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &170076734
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 170076733}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.802082
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &170076735
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 170076733}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &534669902
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 534669905}
|
||||
- component: {fileID: 534669904}
|
||||
- component: {fileID: 534669903}
|
||||
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 &534669903
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &534669904
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
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: 5
|
||||
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: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &534669905
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 534669902}
|
||||
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 &686576305
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 686576307}
|
||||
- component: {fileID: 686576306}
|
||||
m_Layer: 0
|
||||
m_Name: GameManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &686576306
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686576305}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 25e2e19e6317942ae86eed73cec6b312, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &686576307
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 686576305}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 500, y: 0, z: 500}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2017654164
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2017654169}
|
||||
- component: {fileID: 2017654168}
|
||||
- component: {fileID: 2017654167}
|
||||
- component: {fileID: 2017654166}
|
||||
- component: {fileID: 2017654165}
|
||||
m_Layer: 0
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2017654165
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2017654164}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 463607cc3fa8d4e6eb8ee6a99700b297, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RotateAmount: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &2017654166
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2017654164}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &2017654167
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2017654164}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &2017654168
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2017654164}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &2017654169
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2017654164}
|
||||
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}
|
||||
--- !u!1001 &6039031816397428452
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326934, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: EventSystem
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3, type: 3}
|
||||
--- !u!1001 &7291290397651098232
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 7291290397651098233}
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: LoadScene
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.Object, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1196101404385155699, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2971098080083335697, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Text
|
||||
value: LOAD NATIVE SCENE
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5538639073852135152, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -187
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5538639073852135152, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 6.047
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0.15557861
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -1.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.662561
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.72
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.41054428
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 2.809021
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6456697944676594922, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.588
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6868688753829550430, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 7291290397651098233}
|
||||
- target: {fileID: 6868688753829550430, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: LoadScene
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396373430097, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: MessengerFlutter
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396553264007, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396553264007, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: LoadScene
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946401, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_PixelPerfect
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946401, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_RenderMode
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946401, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Camera
|
||||
value:
|
||||
objectReference: {fileID: 534669904}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946414, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Canvas
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290397388395909, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Color.r
|
||||
value: 0.41176474
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290397388395909, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Color.g
|
||||
value: 0.38823533
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290397388395909, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Color.b
|
||||
value: 0.37254903
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290397388395909, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Color.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: fb9e458338d464183be39dc9376b06ca, type: 3}
|
||||
--- !u!114 &7291290397651098233 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 1150292537242516124, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 7291290397651098232}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 42390a6695e9d4d4f942a004ce0bd8d9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1de23c438491149ecacfae4362bfe5d4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+624
@@ -0,0 +1,624 @@
|
||||
%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.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
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: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
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_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
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.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &597772685
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 597772687}
|
||||
- component: {fileID: 597772686}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &597772686
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 597772685}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &597772687
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 597772685}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1001 &660157405
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326929, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6039031815447326934, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: EventSystem
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3594d1ae1a27a44ef9d3d0196cdd08d3, type: 3}
|
||||
--- !u!1001 &760434236
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 7291290396373430097, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: MessengerFlutter
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396553264007, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: LoadScene
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946401, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_RenderMode
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946401, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_PixelPerfect
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946401, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Camera
|
||||
value:
|
||||
objectReference: {fileID: 1243262499}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946402, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290396675946414, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Canvas_cool
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7291290397388395909, guid: fb9e458338d464183be39dc9376b06ca,
|
||||
type: 3}
|
||||
propertyPath: m_Color.a
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: fb9e458338d464183be39dc9376b06ca, type: 3}
|
||||
--- !u!1 &1206744570
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1206744574}
|
||||
- component: {fileID: 1206744573}
|
||||
- component: {fileID: 1206744572}
|
||||
- component: {fileID: 1206744571}
|
||||
- component: {fileID: 1206744575}
|
||||
m_Layer: 0
|
||||
m_Name: Cylinder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!136 &1206744571
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1206744570}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.5000001
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
|
||||
--- !u!23 &1206744572
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1206744570}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &1206744573
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1206744570}
|
||||
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!4 &1206744574
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1206744570}
|
||||
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}
|
||||
--- !u!114 &1206744575
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1206744570}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 463607cc3fa8d4e6eb8ee6a99700b297, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RotateAmount: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1243262497
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1243262500}
|
||||
- component: {fileID: 1243262499}
|
||||
- component: {fileID: 1243262498}
|
||||
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 &1243262498
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1243262497}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1243262499
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1243262497}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
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: 5
|
||||
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: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1243262500
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1243262497}
|
||||
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}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78e45f16305ad48beb12bee6b4f6e23c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce285f5b99c7a4c1387f17e5f6fd9367
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+810
@@ -0,0 +1,810 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEngine;
|
||||
using Application = UnityEngine.Application;
|
||||
using BuildResult = UnityEditor.Build.Reporting.BuildResult;
|
||||
|
||||
// uncomment for addressables
|
||||
//using UnityEditor.AddressableAssets;
|
||||
//using UnityEditor.AddressableAssets.Settings;
|
||||
|
||||
namespace FlutterUnityIntegration.Editor
|
||||
{
|
||||
public class Build : EditorWindow
|
||||
{
|
||||
private static readonly string ProjectPath = Path.GetFullPath(Path.Combine(Application.dataPath, ".."));
|
||||
private static readonly string APKPath = Path.Combine(ProjectPath, "Builds/" + Application.productName + ".apk");
|
||||
|
||||
private static readonly string AndroidExportPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android/unityLibrary"));
|
||||
private static readonly string WindowsExportPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../windows/unityLibrary/data"));
|
||||
private static readonly string IOSExportPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../ios/UnityLibrary"));
|
||||
private static readonly string WebExportPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../web/UnityLibrary"));
|
||||
private static readonly string IOSExportPluginPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../ios_xcode/UnityLibrary"));
|
||||
|
||||
private bool _pluginMode = false;
|
||||
private static string _persistentKey = "flutter-unity-widget-pluginMode";
|
||||
|
||||
//#region GUI Member Methods
|
||||
[MenuItem("Flutter/Export Android (Debug) %&n", false, 101)]
|
||||
public static void DoBuildAndroidLibraryDebug()
|
||||
{
|
||||
DoBuildAndroid(Path.Combine(APKPath, "unityLibrary"), false, false);
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Export Android (Release) %&m", false, 102)]
|
||||
public static void DoBuildAndroidLibraryRelease()
|
||||
{
|
||||
DoBuildAndroid(Path.Combine(APKPath, "unityLibrary"), false, true);
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Export Android Plugin %&p", false, 103)]
|
||||
public static void DoBuildAndroidPlugin()
|
||||
{
|
||||
DoBuildAndroid(Path.Combine(APKPath, "unityLibrary"), true, true);
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Export IOS (Debug) %&i", false, 201)]
|
||||
public static void DoBuildIOSDebug()
|
||||
{
|
||||
BuildIOS(IOSExportPath, false);
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Export IOS (Release) %&i", false, 202)]
|
||||
public static void DoBuildIOSRelease() {
|
||||
BuildIOS(IOSExportPath, true);
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Export IOS Plugin %&o", false, 203)]
|
||||
public static void DoBuildIOSPlugin()
|
||||
{
|
||||
BuildIOS(IOSExportPluginPath, true);
|
||||
|
||||
// Automate so manual steps
|
||||
SetupIOSProjectForPlugin();
|
||||
|
||||
// Build Archive
|
||||
// BuildUnityFrameworkArchive();
|
||||
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Export Web GL %&w", false, 301)]
|
||||
public static void DoBuildWebGL()
|
||||
{
|
||||
BuildWebGL(WebExportPath);
|
||||
}
|
||||
|
||||
// Hide this button as windows isn't implemented in the Flutter plugin yet.
|
||||
// [MenuItem("Flutter/Export Windows %&d", false, 401)]
|
||||
public static void DoBuildWindowsOS()
|
||||
{
|
||||
BuildWindowsOS(WindowsExportPath);
|
||||
}
|
||||
|
||||
[MenuItem("Flutter/Settings %&S", false, 501)]
|
||||
public static void PluginSettings()
|
||||
{
|
||||
EditorWindow.GetWindow(typeof(Build));
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUILayout.Label("Flutter Unity Widget Settings", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
_pluginMode = EditorGUILayout.Toggle("Plugin Mode", _pluginMode);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorPrefs.SetBool(_persistentKey, _pluginMode);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_pluginMode = EditorPrefs.GetBool(_persistentKey, false);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Build Member Methods
|
||||
|
||||
private static void BuildWindowsOS(String path)
|
||||
{
|
||||
// Switch to Android standalone build.
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
||||
|
||||
if (Directory.Exists(path))
|
||||
Directory.Delete(path, true);
|
||||
|
||||
if (Directory.Exists(WindowsExportPath))
|
||||
Directory.Delete(WindowsExportPath, true);
|
||||
|
||||
var playerOptions = new BuildPlayerOptions
|
||||
{
|
||||
scenes = GetEnabledScenes(),
|
||||
target = BuildTarget.StandaloneWindows64,
|
||||
locationPathName = path,
|
||||
options = BuildOptions.AllowDebugging
|
||||
};
|
||||
|
||||
// Switch to Android standalone build.
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);
|
||||
|
||||
// build addressable
|
||||
ExportAddressables();
|
||||
var report = BuildPipeline.BuildPlayer(playerOptions);
|
||||
|
||||
if (report.summary.result != BuildResult.Succeeded)
|
||||
throw new Exception("Build failed");
|
||||
|
||||
Debug.Log("-- Windows Build: SUCCESSFUL --");
|
||||
}
|
||||
|
||||
private static void BuildWebGL(String path)
|
||||
{
|
||||
// Check if the Unity project is in the expected location
|
||||
if (!IsProjectLocationValid(path, "web")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Switch to Android standalone build.
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
||||
|
||||
if (Directory.Exists(path))
|
||||
Directory.Delete(path, true);
|
||||
|
||||
if (Directory.Exists(WebExportPath))
|
||||
Directory.Delete(WebExportPath, true);
|
||||
|
||||
// EditorUserBuildSettings. = true;
|
||||
|
||||
var playerOptions = new BuildPlayerOptions();
|
||||
playerOptions.scenes = GetEnabledScenes();
|
||||
playerOptions.target = BuildTarget.WebGL;
|
||||
playerOptions.locationPathName = path;
|
||||
|
||||
// Switch to Android standalone build.
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.WebGL, BuildTarget.WebGL);
|
||||
// build addressable
|
||||
ExportAddressables();
|
||||
var report = BuildPipeline.BuildPlayer(playerOptions);
|
||||
|
||||
if (report.summary.result != BuildResult.Succeeded)
|
||||
throw new Exception("Build failed");
|
||||
|
||||
// Copy(path, WebExportPath);
|
||||
ModifyWebGLExport();
|
||||
|
||||
Debug.Log("-- WebGL Build: SUCCESSFUL --");
|
||||
}
|
||||
|
||||
private static void DoBuildAndroid(String buildPath, bool isPlugin, bool isReleaseBuild)
|
||||
{
|
||||
// Check if the Unity project is in the expected location
|
||||
if (!IsProjectLocationValid(AndroidExportPath, "android")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Switch to Android standalone build.
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
||||
|
||||
if (Directory.Exists(APKPath))
|
||||
Directory.Delete(APKPath, true);
|
||||
|
||||
if (Directory.Exists(AndroidExportPath))
|
||||
Directory.Delete(AndroidExportPath, true);
|
||||
|
||||
EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
|
||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
|
||||
|
||||
var playerOptions = new BuildPlayerOptions();
|
||||
playerOptions.scenes = GetEnabledScenes();
|
||||
playerOptions.target = BuildTarget.Android;
|
||||
playerOptions.locationPathName = APKPath;
|
||||
if (!isReleaseBuild)
|
||||
{
|
||||
// remove this line if you don't use a debugger and you want to speed up the flutter build
|
||||
playerOptions.options = BuildOptions.AllowDebugging | BuildOptions.Development;
|
||||
}
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
|
||||
PlayerSettings.SetIl2CppCodeGeneration(NamedBuildTarget.Android, isReleaseBuild ? Il2CppCodeGeneration.OptimizeSpeed : Il2CppCodeGeneration.OptimizeSize);
|
||||
#elif UNITY_2021_2_OR_NEWER
|
||||
PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.Android, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
|
||||
EditorUserBuildSettings.il2CppCodeGeneration = isReleaseBuild ? Il2CppCodeGeneration.OptimizeSpeed : Il2CppCodeGeneration.OptimizeSize;
|
||||
#endif
|
||||
|
||||
// Switch to Android standalone build.
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
||||
// build addressable
|
||||
ExportAddressables();
|
||||
var report = BuildPipeline.BuildPlayer(playerOptions);
|
||||
|
||||
if (report.summary.result != BuildResult.Succeeded)
|
||||
throw new Exception("Build failed");
|
||||
|
||||
Copy(buildPath, AndroidExportPath);
|
||||
|
||||
// Modify build.gradle
|
||||
ModifyAndroidGradle(isPlugin);
|
||||
|
||||
if(isPlugin)
|
||||
{
|
||||
SetupAndroidProjectForPlugin();
|
||||
} else
|
||||
{
|
||||
SetupAndroidProject();
|
||||
}
|
||||
|
||||
// Copy over resources from the launcher module that are used by the library, Avoid deleting the existing src/main/res contents.
|
||||
Copy(Path.Combine(APKPath + "/launcher/src/main/res"), Path.Combine(AndroidExportPath, "src/main/res"), false);
|
||||
|
||||
if (isReleaseBuild) {
|
||||
Debug.Log($"-- Android Release Build: SUCCESSFUL --");
|
||||
} else
|
||||
{
|
||||
Debug.Log($"-- Android Debug Build: SUCCESSFUL --");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ModifyWebGLExport()
|
||||
{
|
||||
// Modify index.html
|
||||
var indexFile = Path.Combine(WebExportPath, "index.html");
|
||||
var indexHtmlText = File.ReadAllText(indexFile);
|
||||
|
||||
indexHtmlText = indexHtmlText.Replace("<script>", @"
|
||||
<script>
|
||||
var mainUnityInstance;
|
||||
|
||||
window['handleUnityMessage'] = function (params) {
|
||||
window.parent.postMessage({
|
||||
name: 'onUnityMessage',
|
||||
data: params,
|
||||
}, '*');
|
||||
};
|
||||
|
||||
window['handleUnitySceneLoaded'] = function (name, buildIndex, isLoaded, isValid) {
|
||||
window.parent.postMessage({
|
||||
name: 'onUnitySceneLoaded',
|
||||
data: {
|
||||
'name': name,
|
||||
'buildIndex': buildIndex,
|
||||
'isLoaded': isLoaded == 1,
|
||||
'isValid': isValid == 1,
|
||||
}
|
||||
}, '*');
|
||||
};
|
||||
|
||||
window.parent.addEventListener('unityFlutterBiding', function (args) {
|
||||
const obj = JSON.parse(args.data);
|
||||
mainUnityInstance.SendMessage(obj.gameObject, obj.methodName, obj.message);
|
||||
});
|
||||
|
||||
window.parent.addEventListener('unityFlutterBidingFnCal', function (args) {
|
||||
mainUnityInstance.SendMessage('GameManager', 'HandleWebFnCall', args.data);
|
||||
});
|
||||
");
|
||||
|
||||
indexHtmlText = indexHtmlText.Replace("canvas.style.width = \"960px\";", "canvas.style.width = \"100%\";");
|
||||
indexHtmlText = indexHtmlText.Replace("canvas.style.height = \"600px\";", "canvas.style.height = \"100%\";");
|
||||
|
||||
indexHtmlText = indexHtmlText.Replace("}).then((unityInstance) => {", @"
|
||||
}).then((unityInstance) => {
|
||||
window.parent.postMessage('unityReady', '*');
|
||||
mainUnityInstance = unityInstance;
|
||||
");
|
||||
File.WriteAllText(indexFile, indexHtmlText);
|
||||
|
||||
/// Modidy style.css
|
||||
var cssFile = Path.Combine($"{WebExportPath}/TemplateData", "style.css");
|
||||
var fullScreenCss = File.ReadAllText(cssFile);
|
||||
fullScreenCss = @"
|
||||
body { padding: 0; margin: 0; overflow: hidden; }
|
||||
#unity-container { position: absolute }
|
||||
#unity-container.unity-desktop { width: 100%; height: 100% }
|
||||
#unity-container.unity-mobile { width: 100%; height: 100% }
|
||||
#unity-canvas { background: #231F20 }
|
||||
.unity-mobile #unity-canvas { width: 100%; height: 100% }
|
||||
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
|
||||
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
|
||||
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; background: url('progress-bar-empty-dark.png') no-repeat center }
|
||||
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
|
||||
#unity-footer { display: none }
|
||||
.unity-mobile #unity-footer { display: none }
|
||||
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
|
||||
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
|
||||
#unity-fullscreen-button { float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
|
||||
#unity-mobile-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
|
||||
";
|
||||
File.WriteAllText(cssFile, fullScreenCss);
|
||||
}
|
||||
|
||||
private static void ModifyAndroidGradle(bool isPlugin)
|
||||
{
|
||||
// Modify build.gradle
|
||||
var buildFile = Path.Combine(AndroidExportPath, "build.gradle");
|
||||
var buildText = File.ReadAllText(buildFile);
|
||||
buildText = buildText.Replace("com.android.application", "com.android.library");
|
||||
buildText = buildText.Replace("bundle {", "splits {");
|
||||
buildText = buildText.Replace("enableSplit = false", "enable false");
|
||||
buildText = buildText.Replace("enableSplit = true", "enable true");
|
||||
buildText = buildText.Replace("implementation fileTree(dir: 'libs', include: ['*.jar'])", "implementation(name: 'unity-classes', ext:'jar')");
|
||||
buildText = buildText.Replace(" + unityStreamingAssets.tokenize(', ')", "");
|
||||
// disable the Unity ndk path as it will conflict with Flutter.
|
||||
buildText = buildText.Replace("ndkPath \"", "// ndkPath \"");
|
||||
|
||||
// check for namespace definition (Android gradle plugin 8+), add a backwards compatible version if it is missing.
|
||||
if(!buildText.Contains("namespace"))
|
||||
{
|
||||
buildText = buildText.Replace("compileOptions {",
|
||||
"if (project.android.hasProperty(\"namespace\")) {\n namespace 'com.unity3d.player'\n }\n\n compileOptions {"
|
||||
);
|
||||
}
|
||||
|
||||
if(isPlugin)
|
||||
{
|
||||
buildText = Regex.Replace(buildText, @"implementation\(name: 'androidx.* ext:'aar'\)", "\n");
|
||||
}
|
||||
|
||||
buildText = Regex.Replace(buildText, @"\n.*applicationId '.+'.*\n", "\n");
|
||||
File.WriteAllText(buildFile, buildText);
|
||||
|
||||
// Modify AndroidManifest.xml
|
||||
var manifestFile = Path.Combine(AndroidExportPath, "src/main/AndroidManifest.xml");
|
||||
var manifestText = File.ReadAllText(manifestFile);
|
||||
manifestText = Regex.Replace(manifestText, @"<application .*>", "<application>");
|
||||
var regex = new Regex(@"<activity.*>(\s|\S)+?</activity>", RegexOptions.Multiline);
|
||||
manifestText = regex.Replace(manifestText, "");
|
||||
File.WriteAllText(manifestFile, manifestText);
|
||||
|
||||
// Modify proguard-unity.txt
|
||||
var proguardFile = Path.Combine(AndroidExportPath, "proguard-unity.txt");
|
||||
var proguardText = File.ReadAllText(proguardFile);
|
||||
proguardText = proguardText.Replace("-ignorewarnings", "-keep class com.xraph.plugin.** { *; }\n-keep class com.unity3d.plugin.* { *; }\n-ignorewarnings");
|
||||
File.WriteAllText(proguardFile, proguardText);
|
||||
}
|
||||
|
||||
private static void BuildIOS(String path, bool isReleaseBuild)
|
||||
{
|
||||
// Check if the Unity project is in the expected location
|
||||
if (!IsProjectLocationValid(path, "ios")) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool abortBuild = false;
|
||||
|
||||
// abort iOS export if #UNITY_IOS is false.
|
||||
// Even after SwitchActiveBuildTarget() it will still be false as the code isn't recompiled yet.
|
||||
// As a workaround, make the user trigger an export again after the switch.
|
||||
|
||||
#if !UNITY_IOS
|
||||
abortBuild = true;
|
||||
if (Application.isBatchMode)
|
||||
{
|
||||
Debug.LogError("Incorrect iOS buildtarget, use the -buildTarget argument to set iOS");
|
||||
}
|
||||
else
|
||||
{
|
||||
bool dialogResult = EditorUtility.DisplayDialog(
|
||||
"Switch build target to iOS?",
|
||||
"Exporting to iOS first requires a build target switch.\nClick 'Export iOS' again after all importing has finished.",
|
||||
"Switch to iOS",
|
||||
"Cancel"
|
||||
);
|
||||
if (dialogResult)
|
||||
{
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.iOS, BuildTarget.iOS);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//don't return within #if !UNITY_IOS as that results in unreachable code warnings.
|
||||
if (abortBuild)
|
||||
return;
|
||||
|
||||
if (Directory.Exists(path))
|
||||
Directory.Delete(path, true);
|
||||
|
||||
#if (UNITY_2021_1_OR_NEWER)
|
||||
EditorUserBuildSettings.iOSXcodeBuildConfig = XcodeBuildConfig.Release;
|
||||
#else
|
||||
EditorUserBuildSettings.iOSBuildConfigType = iOSBuildType.Release;
|
||||
#endif
|
||||
|
||||
#if UNITY_2022_1_OR_NEWER
|
||||
PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.iOS, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
|
||||
PlayerSettings.SetIl2CppCodeGeneration(NamedBuildTarget.iOS, isReleaseBuild ? Il2CppCodeGeneration.OptimizeSpeed : Il2CppCodeGeneration.OptimizeSize);
|
||||
#elif UNITY_2021_2_OR_NEWER
|
||||
PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.iOS, isReleaseBuild ? Il2CppCompilerConfiguration.Release : Il2CppCompilerConfiguration.Debug);
|
||||
EditorUserBuildSettings.il2CppCodeGeneration = isReleaseBuild ? Il2CppCodeGeneration.OptimizeSpeed : Il2CppCodeGeneration.OptimizeSize;
|
||||
#endif
|
||||
|
||||
var playerOptions = new BuildPlayerOptions
|
||||
{
|
||||
scenes = GetEnabledScenes(),
|
||||
target = BuildTarget.iOS,
|
||||
locationPathName = path
|
||||
};
|
||||
|
||||
if (!isReleaseBuild)
|
||||
{
|
||||
playerOptions.options = BuildOptions.AllowDebugging | BuildOptions.Development;
|
||||
}
|
||||
|
||||
// build addressable
|
||||
ExportAddressables();
|
||||
|
||||
var report = BuildPipeline.BuildPlayer(playerOptions);
|
||||
|
||||
if (report.summary.result != BuildResult.Succeeded)
|
||||
throw new Exception("Build failed");
|
||||
|
||||
// log an error if this code is skipped. (might happen when buildtarget is switched from code)
|
||||
bool postBuildExecuted = false;
|
||||
#if UNITY_IOS
|
||||
XcodePostBuild.PostBuild(BuildTarget.iOS, report.summary.outputPath);
|
||||
postBuildExecuted = true;
|
||||
#endif
|
||||
if (postBuildExecuted)
|
||||
{
|
||||
if (isReleaseBuild)
|
||||
{
|
||||
Debug.Log("-- iOS Release Build: SUCCESSFUL --");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("-- iOS Debug Build: SUCCESSFUL --");
|
||||
}
|
||||
} else
|
||||
{
|
||||
Debug.LogError("iOS export failed. Failed to modify Unity's Xcode project.");
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Other Member Methods
|
||||
private static void Copy(string source, string destinationPath, bool clearDestination = true)
|
||||
{
|
||||
if (clearDestination && Directory.Exists(destinationPath))
|
||||
Directory.Delete(destinationPath, true);
|
||||
|
||||
Directory.CreateDirectory(destinationPath);
|
||||
|
||||
foreach (var dirPath in Directory.GetDirectories(source, "*",
|
||||
SearchOption.AllDirectories))
|
||||
Directory.CreateDirectory(dirPath.Replace(source, destinationPath));
|
||||
|
||||
foreach (var newPath in Directory.GetFiles(source, "*.*",
|
||||
SearchOption.AllDirectories))
|
||||
File.Copy(newPath, newPath.Replace(source, destinationPath), true);
|
||||
}
|
||||
|
||||
private static string[] GetEnabledScenes()
|
||||
{
|
||||
var scenes = EditorBuildSettings.scenes
|
||||
.Where(s => s.enabled)
|
||||
.Select(s => s.path)
|
||||
.ToArray();
|
||||
|
||||
return scenes;
|
||||
}
|
||||
|
||||
// uncomment for addressables
|
||||
private static void ExportAddressables() {
|
||||
/*
|
||||
Debug.Log("Start building player content (Addressables)");
|
||||
Debug.Log("BuildAddressablesProcessor.PreExport start");
|
||||
|
||||
AddressableAssetSettings.CleanPlayerContent(
|
||||
AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilder);
|
||||
|
||||
AddressableAssetProfileSettings profileSettings = AddressableAssetSettingsDefaultObject.Settings.profileSettings;
|
||||
string profileId = profileSettings.GetProfileId("Default");
|
||||
AddressableAssetSettingsDefaultObject.Settings.activeProfileId = profileId;
|
||||
|
||||
AddressableAssetSettings.BuildPlayerContent();
|
||||
Debug.Log("BuildAddressablesProcessor.PreExport done");
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This method tries to autome the build setup required for Android
|
||||
/// </summary>
|
||||
private static void SetupAndroidProject()
|
||||
{
|
||||
var androidPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android"));
|
||||
var androidAppPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android/app"));
|
||||
var projBuildPath = Path.Combine(androidPath, "build.gradle");
|
||||
var appBuildPath = Path.Combine(androidAppPath, "build.gradle");
|
||||
var settingsPath = Path.Combine(androidPath, "settings.gradle");
|
||||
|
||||
// switch to Kotlin DSL gradle if .kts file is detected (Fluter 3.29+ by default)
|
||||
if (File.Exists(projBuildPath + ".kts")) {
|
||||
SetupAndroidProjectKotlin();
|
||||
return;
|
||||
}
|
||||
|
||||
var projBuildScript = File.ReadAllText(projBuildPath);
|
||||
var settingsScript = File.ReadAllText(settingsPath);
|
||||
var appBuildScript = File.ReadAllText(appBuildPath);
|
||||
|
||||
// Sets up the project build.gradle files correctly
|
||||
if (!Regex.IsMatch(projBuildScript, @"flatDir[^/]*[^}]*}"))
|
||||
{
|
||||
var regex = new Regex(@"allprojects \{[^\{]*\{", RegexOptions.Multiline);
|
||||
projBuildScript = regex.Replace(projBuildScript, @"
|
||||
allprojects {
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs ""${project(':unityLibrary').projectDir}/libs""
|
||||
}
|
||||
");
|
||||
File.WriteAllText(projBuildPath, projBuildScript);
|
||||
}
|
||||
|
||||
// Sets up the project settings.gradle files correctly
|
||||
if (!Regex.IsMatch(settingsScript, @"include "":unityLibrary"""))
|
||||
{
|
||||
settingsScript += @"
|
||||
|
||||
include "":unityLibrary""
|
||||
project("":unityLibrary"").projectDir = file(""./unityLibrary"")
|
||||
";
|
||||
File.WriteAllText(settingsPath, settingsScript);
|
||||
}
|
||||
|
||||
|
||||
// Sets up the project app build.gradle files correctly
|
||||
if (!Regex.IsMatch(appBuildScript, @"dependencies \{"))
|
||||
{
|
||||
appBuildScript += @"
|
||||
dependencies {
|
||||
implementation project(':unityLibrary')
|
||||
}
|
||||
";
|
||||
File.WriteAllText(appBuildPath, appBuildScript);
|
||||
} else
|
||||
{
|
||||
if (!appBuildScript.Contains(@"implementation project(':unityLibrary')"))
|
||||
{
|
||||
var regex = new Regex(@"dependencies \{", RegexOptions.Multiline);
|
||||
appBuildScript = regex.Replace(appBuildScript, @"
|
||||
dependencies {
|
||||
implementation project(':unityLibrary')
|
||||
");
|
||||
File.WriteAllText(appBuildPath, appBuildScript);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Copy of SetupAndroidProject() adapted to Kotlin DLS .gradle.kts. Generated since Flutter 3.29
|
||||
private static void SetupAndroidProjectKotlin()
|
||||
{
|
||||
var androidPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android"));
|
||||
var androidAppPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android/app"));
|
||||
var projBuildPath = Path.Combine(androidPath, "build.gradle.kts");
|
||||
var appBuildPath = Path.Combine(androidAppPath, "build.gradle.kts");
|
||||
var settingsPath = Path.Combine(androidPath, "settings.gradle.kts");
|
||||
|
||||
|
||||
var projBuildScript = File.ReadAllText(projBuildPath);
|
||||
var settingsScript = File.ReadAllText(settingsPath);
|
||||
var appBuildScript = File.ReadAllText(appBuildPath);
|
||||
|
||||
// Sets up the project build.gradle files correctly
|
||||
if (!Regex.IsMatch(projBuildScript, @"flatDir[^/]*[^}]*}"))
|
||||
{
|
||||
var regex = new Regex(@"allprojects \{[^\{]*\{", RegexOptions.Multiline);
|
||||
projBuildScript = regex.Replace(projBuildScript, @"
|
||||
allprojects {
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs(file(""${project("":unityLibrary"").projectDir}/libs""))
|
||||
}
|
||||
");
|
||||
File.WriteAllText(projBuildPath, projBuildScript);
|
||||
}
|
||||
|
||||
// Sets up the project settings.gradle files correctly
|
||||
if (!Regex.IsMatch(settingsScript, @"include("":unityLibrary"")"))
|
||||
{
|
||||
settingsScript += @"
|
||||
|
||||
include("":unityLibrary"")
|
||||
project("":unityLibrary"").projectDir = file(""./unityLibrary"")
|
||||
";
|
||||
File.WriteAllText(settingsPath, settingsScript);
|
||||
}
|
||||
|
||||
|
||||
// Sets up the project app build.gradle files correctly
|
||||
if (!Regex.IsMatch(appBuildScript, @"dependencies \{"))
|
||||
{
|
||||
appBuildScript += @"
|
||||
dependencies {
|
||||
implementation(project("":unityLibrary""))
|
||||
}
|
||||
";
|
||||
File.WriteAllText(appBuildPath, appBuildScript);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!appBuildScript.Contains(@"implementation(project("":unityLibrary"")"))
|
||||
{
|
||||
var regex = new Regex(@"dependencies \{", RegexOptions.Multiline);
|
||||
appBuildScript = regex.Replace(appBuildScript, @"
|
||||
dependencies {
|
||||
implementation(project("":unityLibrary""))
|
||||
");
|
||||
File.WriteAllText(appBuildPath, appBuildScript);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method tries to autome the build setup required for Android
|
||||
/// </summary>
|
||||
private static void SetupAndroidProjectForPlugin()
|
||||
{
|
||||
var androidPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android"));
|
||||
var projBuildPath = Path.Combine(androidPath, "build.gradle");
|
||||
var settingsPath = Path.Combine(androidPath, "settings.gradle");
|
||||
|
||||
if (File.Exists(projBuildPath + ".kts")) {
|
||||
SetupAndroidProjectForPluginKotlin();
|
||||
return;
|
||||
}
|
||||
|
||||
var projBuildScript = File.ReadAllText(projBuildPath);
|
||||
var settingsScript = File.ReadAllText(settingsPath);
|
||||
|
||||
// Sets up the project build.gradle files correctly
|
||||
if (Regex.IsMatch(projBuildScript, @"// BUILD_ADD_UNITY_LIBS"))
|
||||
{
|
||||
var regex = new Regex(@"// BUILD_ADD_UNITY_LIBS", RegexOptions.Multiline);
|
||||
projBuildScript = regex.Replace(projBuildScript, @"
|
||||
flatDir {
|
||||
dirs ""${project(':unityLibrary').projectDir}/libs""
|
||||
}
|
||||
");
|
||||
File.WriteAllText(projBuildPath, projBuildScript);
|
||||
}
|
||||
|
||||
// Sets up the project settings.gradle files correctly
|
||||
if (!Regex.IsMatch(settingsScript, @"include "":unityLibrary"""))
|
||||
{
|
||||
settingsScript += @"
|
||||
|
||||
include "":unityLibrary""
|
||||
project("":unityLibrary"").projectDir = file(""./unityLibrary"")
|
||||
";
|
||||
File.WriteAllText(settingsPath, settingsScript);
|
||||
}
|
||||
}
|
||||
|
||||
// Copy of SetupAndroidProjectForPlugin() adapted to Kotlin DLS .gradle.kts. Generated since Flutter 3.29
|
||||
private static void SetupAndroidProjectForPluginKotlin()
|
||||
{
|
||||
var androidPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../android"));
|
||||
var projBuildPath = Path.Combine(androidPath, "build.gradle.kts");
|
||||
var settingsPath = Path.Combine(androidPath, "settings.gradle.kts");
|
||||
|
||||
var projBuildScript = File.ReadAllText(projBuildPath);
|
||||
var settingsScript = File.ReadAllText(settingsPath);
|
||||
|
||||
// Sets up the project build.gradle files correctly
|
||||
if (Regex.IsMatch(projBuildScript, @"// BUILD_ADD_UNITY_LIBS"))
|
||||
{
|
||||
var regex = new Regex(@"// BUILD_ADD_UNITY_LIBS", RegexOptions.Multiline);
|
||||
projBuildScript = regex.Replace(projBuildScript, @"
|
||||
flatDir {
|
||||
dirs(file(""${project("":unityLibrary"").projectDir}/libs""))
|
||||
}
|
||||
");
|
||||
File.WriteAllText(projBuildPath, projBuildScript);
|
||||
}
|
||||
|
||||
// Sets up the project settings.gradle files correctly
|
||||
if (!Regex.IsMatch(settingsScript, @"include("":unityLibrary"")"))
|
||||
{
|
||||
settingsScript += @"
|
||||
|
||||
include("":unityLibrary"")
|
||||
project("":unityLibrary"").projectDir = file(""./unityLibrary"")
|
||||
";
|
||||
File.WriteAllText(settingsPath, settingsScript);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetupIOSProjectForPlugin()
|
||||
{
|
||||
var iosRunnerPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../ios"));
|
||||
var pubsecFile = Path.Combine(iosRunnerPath, "flutter_unity_widget.podspec");
|
||||
var pubsecText = File.ReadAllText(pubsecFile);
|
||||
|
||||
if (!Regex.IsMatch(pubsecText, @"\w\.xcconfig(?:[^}]*})+") && !Regex.IsMatch(pubsecText, @"tar -xvjf UnityFramework.tar.bz2"))
|
||||
{
|
||||
var regex = new Regex(@"\w\.xcconfig(?:[^}]*})+", RegexOptions.Multiline);
|
||||
pubsecText = regex.Replace(pubsecText, @"
|
||||
spec.xcconfig = {
|
||||
'FRAMEWORK_SEARCH_PATHS' => '""${PODS_ROOT}/../.symlinks/plugins/flutter_unity_widget/ios"" ""${PODS_ROOT}/../.symlinks/flutter/ios-release"" ""${PODS_CONFIGURATION_BUILD_DIR}""',
|
||||
'OTHER_LDFLAGS' => '$(inherited) -framework UnityFramework \${PODS_LIBRARIES}'
|
||||
}
|
||||
|
||||
spec.vendored_frameworks = ""UnityFramework.framework""
|
||||
");
|
||||
File.WriteAllText(pubsecFile, pubsecText);
|
||||
}
|
||||
}
|
||||
|
||||
// DO NOT USE (Contact before trying)
|
||||
private static async void BuildUnityFrameworkArchive()
|
||||
{
|
||||
var xcprojectExt = "/Unity-iPhone.xcodeproj";
|
||||
|
||||
// check if we have a workspace or not
|
||||
if (Directory.Exists(IOSExportPluginPath + "/Unity-iPhone.xcworkspace")) {
|
||||
xcprojectExt = "/Unity-iPhone.xcworkspace";
|
||||
}
|
||||
|
||||
const string framework = "UnityFramework";
|
||||
var xcprojectName = $"{IOSExportPluginPath}{xcprojectExt}";
|
||||
var schemeName = $"{framework}";
|
||||
var buildPath = IOSExportPluginPath + "/build";
|
||||
var frameworkNameWithExt = $"{framework}.framework";
|
||||
|
||||
var iosRunnerPath = Path.GetFullPath(Path.Combine(ProjectPath, "../../ios/"));
|
||||
const string iosArchiveDir = "Release-iphoneos-archive";
|
||||
var iosArchiveFrameworkPath = $"{buildPath}/{iosArchiveDir}/Products/Library/Frameworks/{frameworkNameWithExt}";
|
||||
var dysmNameWithExt = $"{frameworkNameWithExt}.dSYM";
|
||||
|
||||
try
|
||||
{
|
||||
Debug.Log("### Cleaning up after old builds");
|
||||
await $" - rf {iosRunnerPath}{frameworkNameWithExt}".Bash("rm");
|
||||
await $" - rf {buildPath}".Bash("rm");
|
||||
|
||||
Debug.Log("### BUILDING FOR iOS");
|
||||
Debug.Log("### Building for device (Archive)");
|
||||
|
||||
await $"archive -workspace {xcprojectName} -scheme {schemeName} -sdk iphoneos -archivePath {buildPath}/Release-iphoneos.xcarchive ENABLE_BITCODE=NO |xcpretty".Bash("xcodebuild");
|
||||
|
||||
Debug.Log("### Copying framework files");
|
||||
await $" -RL {iosArchiveFrameworkPath} {iosRunnerPath}/{frameworkNameWithExt}".Bash("cp");
|
||||
await $" -RL {iosArchiveFrameworkPath}/{dysmNameWithExt} {iosRunnerPath}/{dysmNameWithExt}".Bash("cp");
|
||||
Debug.Log("### DONE ARCHIVING");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// check if the Unity project is in the expected location
|
||||
private static bool IsProjectLocationValid(string unityLibraryPath, string platform)
|
||||
{
|
||||
// android, ios and web use platform/unityLibrary, move up one step.
|
||||
string platformPath = Path.Combine(unityLibraryPath, "../");
|
||||
if (!Directory.Exists(platformPath))
|
||||
{
|
||||
Debug.LogError($"Could not find the Flutter project {platform} folder. Make sure the Unity project folder is located in '<flutter-project>/unity/<unity-project-folder>' .");
|
||||
Debug.Log($"-- Build: Failed --");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 013ed8e117a3e4b12aec7a1e43a2d38a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,52 @@
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
public static class SweetShellHelper
|
||||
{
|
||||
public static Task<int> Bash(this string cmd, string fileName)
|
||||
{
|
||||
var source = new TaskCompletionSource<int>();
|
||||
var escapedArgs = cmd.Replace("\"", "\\\"");
|
||||
var process = new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
Arguments = $"\"{escapedArgs}\"",
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
},
|
||||
EnableRaisingEvents = true
|
||||
};
|
||||
process.Exited += (sender, args) =>
|
||||
{
|
||||
UnityEngine.Debug.LogWarning(process.StandardError.ReadToEnd());
|
||||
UnityEngine.Debug.Log(process.StandardOutput.ReadToEnd());
|
||||
if (process.ExitCode == 0)
|
||||
{
|
||||
source.SetResult(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
source.SetException(new Exception($"Command `{cmd}` failed with exit code `{process.ExitCode}`"));
|
||||
}
|
||||
|
||||
process.Dispose();
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
process.Start();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
UnityEngine.Debug.LogError(e);
|
||||
source.SetException(e);
|
||||
}
|
||||
|
||||
return source.Task;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 035814c9f0f584c2d904bb37a369324c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+382
@@ -0,0 +1,382 @@
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2021 REX ISAAC RAPHAEL
|
||||
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 the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#if UNITY_IOS
|
||||
|
||||
using System;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEditor.iOS.Xcode;
|
||||
|
||||
/// <summary>
|
||||
/// Adding this post build script to Unity project enables the flutter-unity-widget to access it
|
||||
/// </summary>
|
||||
public static class XcodePostBuild
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The identifier added to touched file to avoid double edits when building to existing directory without
|
||||
/// replace existing content.
|
||||
/// </summary>
|
||||
private const string TouchedMarker = "https://github.com/juicycleff/flutter-unity-view-widget";
|
||||
|
||||
//trigger this manually from build.cs as [PostProcessBuild] or IPostprocessBuildWithReport don't always seem to trigger.
|
||||
public static void PostBuild(BuildTarget target, string pathToBuiltProject)
|
||||
{
|
||||
if (target != BuildTarget.iOS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PatchUnityNativeCode(pathToBuiltProject);
|
||||
|
||||
UpdateUnityProjectFiles(pathToBuiltProject);
|
||||
|
||||
UpdateBuildSettings(pathToBuiltProject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We need to set particular build settings on the UnityFramework target.
|
||||
/// This includes:
|
||||
/// - skip_install = NO (It is YES by default)
|
||||
/// </summary>
|
||||
/// <param name="pathToBuildProject"></param>
|
||||
private static void UpdateBuildSettings(string pathToBuildProject)
|
||||
{
|
||||
var pbx = new PBXProject();
|
||||
var pbxPath = Path.Combine(pathToBuildProject, "Unity-iPhone.xcodeproj/project.pbxproj");
|
||||
pbx.ReadFromFile(pbxPath);
|
||||
|
||||
var targetGuid = pbx.GetUnityFrameworkTargetGuid();
|
||||
var projGuid = pbx.ProjectGuid();
|
||||
|
||||
// TODO: Rex optional set this value
|
||||
// Set skip_install to NO
|
||||
pbx.SetBuildProperty(targetGuid, "SKIP_INSTALL", "YES");
|
||||
|
||||
// Set some linker flags
|
||||
pbx.SetBuildProperty(projGuid, "ENABLE_BITCODE", "NO");
|
||||
|
||||
// Persist changes
|
||||
pbx.WriteToFile(pbxPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We need to add the Data folder to the UnityFramework framework
|
||||
/// </summary>
|
||||
private static void UpdateUnityProjectFiles(string pathToBuiltProject)
|
||||
{
|
||||
var pbx = new PBXProject();
|
||||
var pbxPath = Path.Combine(pathToBuiltProject, "Unity-iPhone.xcodeproj/project.pbxproj");
|
||||
pbx.ReadFromFile(pbxPath);
|
||||
|
||||
// PatchRemoveTargetMembership(pathToBuiltProject);
|
||||
// Add unityLibrary/Data
|
||||
var targetGuid = pbx.TargetGuidByName("UnityFramework");
|
||||
var fileGuid = pbx.AddFolderReference(Path.Combine(pathToBuiltProject, "Data"), "Data");
|
||||
pbx.AddFileToBuild(targetGuid, fileGuid);
|
||||
|
||||
pbx.WriteToFile(pbxPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make necessary changes to Unity build output that enables it to be embedded into existing Xcode project.
|
||||
/// </summary>
|
||||
private static void PatchUnityNativeCode(string pathToBuiltProject)
|
||||
{
|
||||
if (!CheckUnityAppController(Path.Combine(pathToBuiltProject, "Classes/UnityAppController.h")))
|
||||
{
|
||||
EditUnityAppControllerH(Path.Combine(pathToBuiltProject, "Classes/UnityAppController.h"));
|
||||
MarkUnityAppControllerH(Path.Combine(pathToBuiltProject, "Classes/UnityAppController.h"));
|
||||
}
|
||||
|
||||
if (!CheckUnityAppController(Path.Combine(pathToBuiltProject, "Classes/UnityAppController.mm")))
|
||||
{
|
||||
EditUnityAppControllerMM(Path.Combine(pathToBuiltProject, "Classes/UnityAppController.mm"));
|
||||
MarkUnityAppControllerMM(Path.Combine(pathToBuiltProject, "Classes/UnityAppController.mm"));
|
||||
}
|
||||
}
|
||||
|
||||
private static bool MarkUnityAppControllerH(string path)
|
||||
{
|
||||
var inScope = false;
|
||||
var mark = false;
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
inScope |= line.Contains("include \"RenderPluginDelegate.h\"");
|
||||
if (inScope)
|
||||
{
|
||||
if (line.Trim() == "")
|
||||
{
|
||||
inScope = false;
|
||||
|
||||
return new string[]
|
||||
{
|
||||
"",
|
||||
"// Edited by " + TouchedMarker,
|
||||
"",
|
||||
};
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
});
|
||||
return mark;
|
||||
}
|
||||
|
||||
private static bool MarkUnityAppControllerMM(string path)
|
||||
{
|
||||
var inScope = false;
|
||||
var mark = false;
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
inScope |= line.Contains("#include <sys/sysctl.h>");
|
||||
if (inScope)
|
||||
{
|
||||
if (line.Trim() == "")
|
||||
{
|
||||
inScope = false;
|
||||
|
||||
return new string[]
|
||||
{
|
||||
"",
|
||||
"// Edited by " + TouchedMarker,
|
||||
"",
|
||||
};
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
});
|
||||
return mark;
|
||||
}
|
||||
private static bool CheckUnityAppController(string path)
|
||||
{
|
||||
var mark = false;
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
mark |= line.Contains("// Edited by " + TouchedMarker);
|
||||
return new string[] { line };
|
||||
});
|
||||
return mark;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit 'UnityAppController.h': returns 'UnityAppController' from 'AppDelegate' class.
|
||||
/// </summary>
|
||||
private static void EditUnityAppControllerH(string path)
|
||||
{
|
||||
var inScope = false;
|
||||
var markerDetected = false;
|
||||
|
||||
// Modify inline GetAppController
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
inScope |= line.Contains("include \"RenderPluginDelegate.h\"");
|
||||
|
||||
if (inScope && !markerDetected)
|
||||
{
|
||||
if (line.Trim() == "")
|
||||
{
|
||||
inScope = false;
|
||||
markerDetected = true;
|
||||
|
||||
return new string[]
|
||||
{
|
||||
"",
|
||||
"// Added by " + TouchedMarker,
|
||||
"@protocol UnityEventListener <NSObject>",
|
||||
"- (void)onSceneLoaded:(NSString *)name buildIndex:(NSInteger *)bIndex loaded:(bool *)isLoaded valid:(bool *)IsValid;",
|
||||
"- (void)onMessage:(NSString *)message;",
|
||||
"@end",
|
||||
"",
|
||||
};
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
});
|
||||
|
||||
inScope = false;
|
||||
markerDetected = false;
|
||||
|
||||
// Modify inline GetAppController
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
inScope |= line.Contains("include \"RenderPluginDelegate.h\"");
|
||||
|
||||
if (inScope && !markerDetected)
|
||||
{
|
||||
if (line.Trim() == "")
|
||||
{
|
||||
inScope = false;
|
||||
markerDetected = true;
|
||||
|
||||
return new string[]
|
||||
{
|
||||
"",
|
||||
"// Added by " + TouchedMarker,
|
||||
"typedef void(^unitySceneLoadedCallbackType)(const char* name, const int* buildIndex, const bool* isLoaded, const bool* IsValid);",
|
||||
"",
|
||||
"typedef void(^unityMessageCallbackType)(const char* message);",
|
||||
"",
|
||||
};
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
});
|
||||
|
||||
inScope = false;
|
||||
markerDetected = false;
|
||||
|
||||
// Modify inline GetAppController
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
inScope |= line.Contains("quitHandler)");
|
||||
|
||||
if (inScope && !markerDetected)
|
||||
{
|
||||
if (line.Trim() == "")
|
||||
{
|
||||
inScope = false;
|
||||
markerDetected = true;
|
||||
|
||||
return new string[]
|
||||
{
|
||||
"@property (nonatomic, copy) void(^unitySceneLoadedHandler)(const char* name, const int* buildIndex, const bool* isLoaded, const bool* IsValid);",
|
||||
"@property (nonatomic, copy) void(^unityMessageHandler)(const char* message);",
|
||||
};
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit 'UnityAppController.mm': triggers 'UnityReady' notification after Unity is actually started.
|
||||
/// </summary>
|
||||
private static void EditUnityAppControllerMM(string path)
|
||||
{
|
||||
|
||||
var inScope = false;
|
||||
var markerDetected = false;
|
||||
|
||||
EditCodeFile(path, line =>
|
||||
{
|
||||
if (line.Trim() == "@end")
|
||||
{
|
||||
return new string[]
|
||||
{
|
||||
"",
|
||||
"// Added by " + TouchedMarker,
|
||||
"extern \"C\" void OnUnityMessage(const char* message)",
|
||||
"{",
|
||||
" if (GetAppController().unityMessageHandler) {",
|
||||
" GetAppController().unityMessageHandler(message);",
|
||||
" }",
|
||||
"}",
|
||||
"",
|
||||
"extern \"C\" void OnUnitySceneLoaded(const char* name, const int* buildIndex, const bool* isLoaded, const bool* IsValid)",
|
||||
"{",
|
||||
" if (GetAppController().unitySceneLoadedHandler) {",
|
||||
" GetAppController().unitySceneLoadedHandler(name, buildIndex, isLoaded, IsValid);",
|
||||
" }",
|
||||
"}",
|
||||
line,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
inScope |= line.Contains("- (void)startUnity:");
|
||||
markerDetected |= inScope && line.Contains(TouchedMarker);
|
||||
|
||||
//Find the end of the startUnity function, a } without any indentation. (regex: starts with } followed by any whitespace)
|
||||
//Avoid indentation before } as newer unity versions include an if-statement inside this function.
|
||||
if (inScope && Regex.Match(line, @"^}(\s)*$").Success)
|
||||
{
|
||||
inScope = false;
|
||||
|
||||
if (markerDetected)
|
||||
{
|
||||
return new string[] { line };
|
||||
}
|
||||
else
|
||||
{
|
||||
//Add a UnityReady notification at the end of the startUnity function.
|
||||
return new string[]
|
||||
{
|
||||
" // Modified by " + TouchedMarker,
|
||||
@" [[NSNotificationCenter defaultCenter] postNotificationName: @""UnityReady"" object:self];",
|
||||
"}",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return new string[] { line };
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static void EditCodeFile(string path, Func<string, IEnumerable<string>> lineHandler)
|
||||
{
|
||||
var bakPath = path + ".bak";
|
||||
if (File.Exists(bakPath))
|
||||
{
|
||||
File.Delete(bakPath);
|
||||
}
|
||||
|
||||
File.Move(path, bakPath);
|
||||
|
||||
using (var reader = File.OpenText(bakPath))
|
||||
using (var stream = File.Create(path))
|
||||
using (var writer = new StreamWriter(stream))
|
||||
{
|
||||
string line;
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
var outputs = lineHandler(line);
|
||||
foreach (var o in outputs)
|
||||
{
|
||||
writer.WriteLine(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 132db7294ca96475396bb92491a3bf8b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
mergeInto(LibraryManager.library, {
|
||||
OnUnityMessageWeb: function (message) {
|
||||
window.handleUnityMessage(UTF8ToString(message));
|
||||
},
|
||||
|
||||
OnUnitySceneLoadedWeb: function (name, buildIndex, isLoaded, IsValid) {
|
||||
window.handleUnitySceneLoaded(UTF8ToString(name), buildIndex, isLoaded, IsValid);
|
||||
},
|
||||
});
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfee06415a334a24a12c3846cf2b18a5
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 1
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 0
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 1
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c3f323f964d7409b923c39fc511af21
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c47bf4682493249ffb2ba59e043f0dd0
|
||||
folderAsset: yes
|
||||
timeCreated: 1466788344
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4da6fec1bc5747adbe081a531296eed
|
||||
folderAsset: yes
|
||||
timeCreated: 1466788345
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8015
File diff suppressed because it is too large
Load Diff
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed833ea3d720e48a3bfccc01167343c6
|
||||
timeCreated: 1466788355
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Binary file not shown.
+33
@@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2594cf7d48856c44a6a855a987483d7
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88b25391e55c946d2aaba425a98f46a9
|
||||
folderAsset: yes
|
||||
timeCreated: 1466788344
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8040
File diff suppressed because it is too large
Load Diff
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b65f941004d84448bf1108419732aa2
|
||||
timeCreated: 1466788355
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Binary file not shown.
Executable
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89390b301c9e44f309833c9abe2e7b2d
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d473ed1ceeaae48c4b9e23cf2ccb07d5
|
||||
folderAsset: yes
|
||||
timeCreated: 1466788345
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+7977
File diff suppressed because it is too large
Load Diff
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e7979cc6e0f342bfb718e06cbcd84f0
|
||||
timeCreated: 1466788355
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Binary file not shown.
Executable
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfd68a2fa05644f769fc760d65594879
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<linker>
|
||||
<assembly fullname="System">
|
||||
<type fullname="System.ComponentModel.TypeConverter" preserve="all" />
|
||||
<!-- <namespace fullname="System.ComponentModel" preserve="all" /> -->
|
||||
</assembly>
|
||||
</linker>
|
||||
@@ -0,0 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a1e81a885816344c4bc3340c0119fb27
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
+118
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace FlutterUnityIntegration
|
||||
{
|
||||
public class NativeAPI
|
||||
{
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
[DllImport("__Internal")]
|
||||
public static extern void OnUnityMessage(string message);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void OnUnitySceneLoaded(string name, int buildIndex, bool isLoaded, bool IsValid);
|
||||
#endif
|
||||
|
||||
#if UNITY_WEBGL
|
||||
[DllImport("__Internal")]
|
||||
public static extern void OnUnityMessageWeb(string message);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void OnUnitySceneLoadedWeb(string name, int buildIndex, bool isLoaded, bool isValid);
|
||||
#endif
|
||||
|
||||
public static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
try
|
||||
{
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.xraph.plugin.flutter_unity_widget.UnityPlayerUtils");
|
||||
jc.CallStatic("onUnitySceneLoaded", scene.name, scene.buildIndex, scene.isLoaded, scene.IsValid());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.Message);
|
||||
}
|
||||
#elif UNITY_WEBGL
|
||||
OnUnitySceneLoadedWeb(scene.name, scene.buildIndex, scene.isLoaded, scene.IsValid());
|
||||
#elif UNITY_IOS && !UNITY_EDITOR
|
||||
OnUnitySceneLoaded(scene.name, scene.buildIndex, scene.isLoaded, scene.IsValid());
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void SendMessageToFlutter(string message)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
try
|
||||
{
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.xraph.plugin.flutter_unity_widget.UnityPlayerUtils");
|
||||
jc.CallStatic("onUnityMessage", message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.Message);
|
||||
}
|
||||
#elif UNITY_WEBGL
|
||||
OnUnityMessageWeb(message);
|
||||
#elif UNITY_IOS && !UNITY_EDITOR
|
||||
OnUnityMessage(message);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void ShowHostMainWindow()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
try
|
||||
{
|
||||
var jc = new AndroidJavaClass("com.xraph.plugin.flutter_unity_widget.OverrideUnityActivity");
|
||||
var overrideActivity = jc.GetStatic<AndroidJavaObject>("instance");
|
||||
overrideActivity.Call("showMainActivity");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.Message);
|
||||
}
|
||||
#elif UNITY_IOS && !UNITY_EDITOR
|
||||
// NativeAPI.showHostMainWindow();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void UnloadMainWindow()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
try
|
||||
{
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.xraph.plugin.flutter_unity_widget.OverrideUnityActivity");
|
||||
AndroidJavaObject overrideActivity = jc.GetStatic<AndroidJavaObject>("instance");
|
||||
overrideActivity.Call("unloadPlayer");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.Message);
|
||||
}
|
||||
#elif UNITY_IOS && !UNITY_EDITOR
|
||||
// NativeAPI.unloadPlayer();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void QuitUnityWindow()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
try
|
||||
{
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.xraph.plugin.flutter_unity_widget.OverrideUnityActivity");
|
||||
AndroidJavaObject overrideActivity = jc.GetStatic<AndroidJavaObject>("instance");
|
||||
overrideActivity.Call("quitPlayer");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.Message);
|
||||
}
|
||||
#elif UNITY_IOS && !UNITY_EDITOR
|
||||
// NativeAPI.quitPlayer();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a74f0e0f573124897ae786004a599741
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c933088c884fa446a9ef6fcc5d4967b7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92f5869add8134466b0b7cff3ac1b558
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
// [!] important set UnityFramework in Target Membership for this file
|
||||
// [!] and set Public header visibility
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
// NativeCallsProtocol defines protocol with methods you want to be called from managed
|
||||
@protocol NativeCallsProtocol
|
||||
@required
|
||||
- (void) showHostMainWindow;
|
||||
- (void) unloadPlayer;
|
||||
- (void) quitPlayer;
|
||||
// other methods
|
||||
@end
|
||||
|
||||
__attribute__ ((visibility("default")))
|
||||
@interface FrameworkLibAPI : NSObject
|
||||
// call it any time after UnityFrameworkLoad to set object implementing NativeCallsProtocol methods
|
||||
+(void) registerAPIforNativeCalls:(id<NativeCallsProtocol>) aApi;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5a113ae9e7ae44ffbf2067558023a36
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 1
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
Exclude tvOS: 0
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NativeCallProxy.h"
|
||||
|
||||
|
||||
@implementation FrameworkLibAPI
|
||||
|
||||
id<NativeCallsProtocol> api = NULL;
|
||||
+(void) registerAPIforNativeCalls:(id<NativeCallsProtocol>) aApi
|
||||
{
|
||||
api = aApi;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
extern "C" {
|
||||
void showHostMainWindow() { return [api showHostMainWindow]; }
|
||||
void unloadPlayer() { return [api unloadPlayer]; }
|
||||
void quitPlayer() { return [api quitPlayer]; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f676dfd3d6fd4ae49028c89adc526f9
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 1
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
Exclude tvOS: 0
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
DOCUMENTATION
|
||||
|
||||
Visit https://github.com/juicycleff/flutter-unity-view-widget
|
||||
|
||||
unitypackage version: fuw-2022.3.0
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27e3ba5602e8640efa9213abe9935d3b
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FlutterUnityIntegration
|
||||
{
|
||||
public abstract class SingletonMonoBehaviour<T> : MonoBehaviour where T : MonoBehaviour
|
||||
{
|
||||
private static readonly Lazy<T> LazyInstance = new Lazy<T>(CreateSingleton);
|
||||
|
||||
public static T Instance => LazyInstance.Value;
|
||||
|
||||
private static T CreateSingleton()
|
||||
{
|
||||
var ownerObject = new GameObject($"{typeof(T).Name} (singleton)");
|
||||
var instance = ownerObject.AddComponent<T>();
|
||||
DontDestroyOnLoad(ownerObject);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26f606bd4d23f497fa7b976bf9684caf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace FlutterUnityIntegration
|
||||
{
|
||||
public class MessageHandler
|
||||
{
|
||||
public int id;
|
||||
public string seq;
|
||||
|
||||
public String name;
|
||||
private readonly JToken data;
|
||||
|
||||
public static MessageHandler Deserialize(string message)
|
||||
{
|
||||
var m = JObject.Parse(message);
|
||||
var handler = new MessageHandler(
|
||||
m.GetValue("id").Value<int>(),
|
||||
m.GetValue("seq").Value<string>(),
|
||||
m.GetValue("name").Value<string>(),
|
||||
m.GetValue("data")
|
||||
);
|
||||
return handler;
|
||||
}
|
||||
|
||||
public T getData<T>()
|
||||
{
|
||||
return data.Value<T>();
|
||||
}
|
||||
|
||||
public MessageHandler(int id, string seq, string name, JToken data)
|
||||
{
|
||||
this.id = id;
|
||||
this.seq = seq;
|
||||
this.name = name;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public void send(object data)
|
||||
{
|
||||
var o = JObject.FromObject(new
|
||||
{
|
||||
id = id,
|
||||
seq = "end",
|
||||
name = name,
|
||||
data = data
|
||||
});
|
||||
UnityMessageManager.Instance.SendMessageToFlutter(UnityMessageManager.MessagePrefix + o.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public class UnityMessage
|
||||
{
|
||||
public String name;
|
||||
public JObject data;
|
||||
public Action<object> callBack;
|
||||
}
|
||||
|
||||
public class UnityMessageManager : SingletonMonoBehaviour<UnityMessageManager>
|
||||
{
|
||||
|
||||
public const string MessagePrefix = "@UnityMessage@";
|
||||
private static int ID = 0;
|
||||
|
||||
private static int generateId()
|
||||
{
|
||||
ID = ID + 1;
|
||||
return ID;
|
||||
}
|
||||
|
||||
public delegate void MessageDelegate(string message);
|
||||
public event MessageDelegate OnMessage;
|
||||
|
||||
public delegate void MessageHandlerDelegate(MessageHandler handler);
|
||||
public event MessageHandlerDelegate OnFlutterMessage;
|
||||
|
||||
private readonly Dictionary<int, UnityMessage> waitCallbackMessageMap = new Dictionary<int, UnityMessage>();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SceneManager.sceneLoaded += OnSceneLoaded;
|
||||
}
|
||||
|
||||
void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
{
|
||||
NativeAPI.OnSceneLoaded(scene, mode);
|
||||
|
||||
}
|
||||
|
||||
public void ShowHostMainWindow()
|
||||
{
|
||||
NativeAPI.ShowHostMainWindow();
|
||||
}
|
||||
|
||||
public void UnloadMainWindow()
|
||||
{
|
||||
NativeAPI.UnloadMainWindow();
|
||||
}
|
||||
|
||||
|
||||
public void QuitUnityWindow()
|
||||
{
|
||||
NativeAPI.QuitUnityWindow();
|
||||
}
|
||||
|
||||
|
||||
public void SendMessageToFlutter(string message)
|
||||
{
|
||||
NativeAPI.SendMessageToFlutter(message);
|
||||
}
|
||||
|
||||
public void SendMessageToFlutter(UnityMessage message)
|
||||
{
|
||||
var id = generateId();
|
||||
if (message.callBack != null)
|
||||
{
|
||||
waitCallbackMessageMap.Add(id, message);
|
||||
}
|
||||
|
||||
var o = JObject.FromObject(new
|
||||
{
|
||||
id = id,
|
||||
seq = message.callBack != null ? "start" : "",
|
||||
name = message.name,
|
||||
data = message.data
|
||||
});
|
||||
UnityMessageManager.Instance.SendMessageToFlutter(MessagePrefix + o.ToString());
|
||||
}
|
||||
|
||||
void onMessage(string message)
|
||||
{
|
||||
OnMessage?.Invoke(message);
|
||||
}
|
||||
|
||||
void onFlutterMessage(string message)
|
||||
{
|
||||
if (message.StartsWith(MessagePrefix))
|
||||
{
|
||||
message = message.Replace(MessagePrefix, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var handler = MessageHandler.Deserialize(message);
|
||||
if ("end".Equals(handler.seq))
|
||||
{
|
||||
// handle callback message
|
||||
if (!waitCallbackMessageMap.TryGetValue(handler.id, out var m)) return;
|
||||
waitCallbackMessageMap.Remove(handler.id);
|
||||
m.callBack?.Invoke(handler.getData<object>()); // todo
|
||||
return;
|
||||
}
|
||||
|
||||
OnFlutterMessage?.Invoke(handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8f0d555a552e429a9e36a2bec4c1faf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
<linker>
|
||||
<!-- The following assemblies contain namespaces that should be fully preserved
|
||||
even when assembly stripping is used. Not excluding the assemblies below from
|
||||
stripping can result in crashes or various exceptions. -->
|
||||
<assembly fullname="System">
|
||||
<type fullname="System.ComponentModel.TypeConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.ArrayConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.BaseNumberConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.BooleanConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.ByteConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.CharConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.CollectionConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.ComponentConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.CultureInfoConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.DateTimeConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.DecimalConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.DoubleConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.EnumConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.ExpandableObjectConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.Int16Converter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.Int32Converter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.Int64Converter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.NullableConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.SByteConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.SingleConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.StringConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.TimeSpanConverter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.UInt16Converter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.UInt32Converter" preserve="all"/>
|
||||
<type fullname="System.ComponentModel.UInt64Converter" preserve="all"/>
|
||||
</assembly>
|
||||
</linker>
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dffa6b3463c3f4197ba06e68d68f2285
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user